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 JAVA):

Solution:
'use strict';

var newLine = readline().split(' ').map(function (number) {
  return parseInt(number);
});

var amount = newLine[1];
var word = readline();

var getWordPart = function getWordPart(mode, word, amount) {

  if (word.length / 2 >= amount - 0.5) {

    var part = mode === 'begin' ? word.slice(0, amount) : word.slice(-amount);
    return part;
  }

  return false;
};

var getMaxAmount = function getMaxAmount(word) {

  var maxAmount = 0;

  for (var counter = 0; counter < word.length; counter++) {
    var beginPart = getWordPart('begin', word, counter + 1);
    var endPart = getWordPart('end', word, counter + 1);

    if (beginPart && beginPart === endPart) {
      if (isSameSymbols(replaceParts(word, beginPart, '*'), '*')) {
        return -(counter + 1);
      }
      maxAmount = counter + 1;
    }
  }

  // console.log(maxAmount)
  return maxAmount;
};

var isSameSymbols = function isSameSymbols(word, letter) {

  for (var i = 0; i < word.length; i++) {

    if (letter !== word[i]) {
      return false;
    }
  }

  // console.log('SAME')
  return true;
};

var replaceParts = function replaceParts(word, part, symbol) {

  var wordLength = word.length;

  for (var i = 0; i < wordLength / part.length + 1; i++) {
    word = word.replace(part, symbol);
  }

  // console.log('replaceParts', part, word);
  return word;
};

var addPart = function addPart(part, amount) {
  var result = '';

  while (amount > 0) {
    result += part;
    amount--;
  }

  return result;
};

var isPalindrom = function isPalindrom(word) {

  if (word[0] === word[word.length - 1]) {
    if (word.length <= 1) return true;
    return isPalindrom(word.slice(1, word.length - 1));
  }

  return false;
};

var partLength = getMaxAmount(word);
var begin = '';
var h = partLength > 0 && word.length >= 6 && word[0] === word[word.length - 1] && !isSameSymbols(word, word[0]) && isPalindrom(word);

// console.log(partLength);
if (h) {
  begin = word[0];
  partLength = getMaxAmount(word.slice(1));
  word = word.slice(1);
}

write(begin + word + addPart(word.slice(partLength), amount - 1));