Problem: You are given a string t consisting of n lowercase Latin letters and an integer number k.

Let's define a substring of some string s with indices from l to r as s[l ... r].

Your task is to construct such string s of minimum possible length that there are exactly k positions i such that s[i ... i + n - 1] = t. In other words, your task is to construct such string s of minimum possible length that there are exactly k substrings of s equal to t.

It is guaranteed that the answer is always unique.

Input

The first line of the input contains two integers n and k (1 ≤ n, k ≤ 50) — the length of the string t and the number of substrings.

The second line of the input contains the string t consisting of exactly n lowercase Latin letters.

Output

Print such string s of minimum possible length that there are exactly k substrings of s equal to t.

It is guaranteed that the answer is always unique.

Examples

Input

3 4
aba


Output

ababababa


Input

3 2
cat


Output

catcat

Solution (in PYTHON3):

Solution:
# This problem is basically about generating a string s which in that string
# contains k word t. But the generated string must have minimum length.

# To generate the string basically we just need to print t but in sort of
# compressed mode. So for example if we have t = "aba" & k = 4, in canonical
# string it would be like "abaabaabaaba" --> but certainly we could compress
# this, right? If we compress the string we get "ababababa".

# Notice that we could compress the string s if word t is having repeateable
# sequence in its prefix & sufix, for example like word "aba", "aabaa", "aaaa". 
# If the word doesn't have repeateable sequence like word "abcd", then the only
# possible resulted string is only canonical string.

# So basically to generate the string, we just need to find the repeatable
# substring then append the rest of it at the end.

n, k = map(int, input().split(" "))
t = input()

# Find index of where the last different char is exist in t, here 
# we use two window to determine the index of last different 
# char. The first window is t[i:] & the second window is t[:-i]
# where i is the current index starting from 1
i = 1
while t[i:] != t[:-i]:
    i += 1

# Print repeatable substring k times then add the rest of word at the end
print(t[:i] * k + t[i:])