#PCBTAM0000022. Căn giữa văn bản theo độ rộng (Center Align Text)

Căn giữa văn bản theo độ rộng (Center Align Text)

Center Align Text

Version: Phuoc Hung OJ Extended

Problem Statement

Given string ss and a minimum field width ww, center ss by inserting spaces on both sides if ∣s∣<w|s|<w. The total number of added spaces is w−∣s∣w-|s|. Split them evenly when possible; if the number is odd, the right side receives the extra space.

If ∣s∣≥w|s|\ge w, preserve ss unchanged. Put a | character at each end to make padding visible.

Input

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

Output

Print one line in the format |centered_field|. Do not truncate or modify ss.

Subtasks

  • Subtask 1 (100 points): 0≤∣s∣≤400\le |s|\le40 Unicode characters; 0≤w≤600\le w\le60.

Examples

Example 1

Input

AB
6

Output

|  AB  |

Explanation. AB has length 22, leaving four positions in width 66; add two spaces on each side.

Example 2

Input

A
4

Output

| A  |

Explanation. A has length 11, leaving three positions; add one space left and two right.

Example 3

Input

Xin
2

Output

|Xin|

Explanation. Xin has length 33, exceeding width 22, so it stays unchanged.