#PCBTAM0000014. Lặp chuỗi ở hai phía (Repeat on Both Sides)

Lặp chuỗi ở hai phía (Repeat on Both Sides)

Repeat on Both Sides

Version: Phuoc Hung OJ Extended

Problem Statement

Given a string ss and a nonnegative integer nn, construct the left part by concatenating nn copies of ss and construct the right part in the same way. Print the left part, one vertical bar |, and then the right part.

Do not insert spaces between copies. The separator is always inserted, even when n=0n=0 or ss is empty.

Input

The first line contains ss, which may be empty. The second contains integer nn.

Output

Print one line consisting of nn copies of ss, the | separator, and another nn copies of ss.

Subtasks

  • Subtask 1 (100 points): 0≤∣s∣≤300\le |s|\le30; 0≤n≤150\le n\le15.

Examples

Example 1

Input

ab
2

Output

abab|abab

Explanation. Two copies of ab produce abab on either side of |.

Example 2

Input

X
0

Output

|

Explanation. At n=0n=0, both sides are empty but the | separator remains.

Example 3

Input

a 
2

Output

a a |a a 

Explanation. Each copy of a ends in a space; two copies on each side preserve these spaces near | and at the end.