#PCBTAM0000021. Căn phải văn bản theo độ rộng (Right Align Text)

Căn phải văn bản theo độ rộng (Right Align Text)

Right Align Text

Version: Phuoc Hung OJ Extended

Problem Statement

Given string ss and nonnegative integer ww, the minimum width of a text field, right-align ss within the field. If ss is shorter than ww, add enough spaces on its left. Otherwise, keep ss unchanged.

Enclose the field in | characters to make the padding visible. Width is measured in Unicode characters, not UTF-8 bytes.

Input

The first line contains ss, possibly empty or containing existing spaces. The second contains integer ww.

Output

Print a line starting and ending with |. The enclosed field has max⁡(∣s∣,w)\max(|s|,w) characters and is right-aligned.

Subtasks

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

Examples

Example 1

Input

A
4

Output

|   A|

Explanation. A has length 11; width 44 requires three spaces before it.

Example 2

Input

Đ
3

Output

|  Đ|

Explanation. Đ is one Unicode code point; width 33 requires two spaces on its left.

Example 3

Input

abcdef
3

Output

|abcdef|

Explanation. abcdef has length 66, greater than width 33, so it is not truncated.