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:
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.util.stream.IntStream;

public class Main {
    InputStream is;
    BufferedReader bufferedReader;
    PrintWriter out;
    String INPUT = "";


    int row[] = { -1, 0, 1, 0 };
    int column[] = { 0, 1, 0, -1 };



    void solve() {
        int n = ni();
        int c = ni();

        String s = ns();
        int left = 0;
        int right = s.length() - 1;
        String start = s.substring(right);
        String last = "";
        while (left <= right) {
            String t1 = s;
            String temp = s.substring(left, right+1);
            String cc = t1.concat(temp);
            if (countSub(cc, s) >= 2){
                last = temp;
            }
            left++;
        }


        for (int i = 0; i < c-1; ++i) {
            s+=last;
        }

        out.println(s);
        //set.stream().forEach(i -> System.out.println(i));
    }

    int countSub(String f, String s) {
        int count = 0;
        for (int i = 0; i < f.length(); ++i) {
            if (f.charAt(i) == s.charAt(0)) {
                int length = 0;
                for (int j = 0; j < s.length() && i+j < f.length(); ++j){
                    if (f.charAt(i+j) == s.charAt(j)){
                        length++;
                    } else {
                        break;
                    }
                }
                if (length == s.length()){
                    count++;
                }
            }
        }
        return count;
    }


    void solve1() {
        int n = ni();
        for (int i = 0; i < n; ++i) {
            int useless = ni();
            String first = ns();
            String second = ns();
            String third = ns();

            BigInteger ansLR = BigInteger.valueOf(1);
            BigInteger ansUD = BigInteger.valueOf(1);
            BigInteger exp = BigInteger.valueOf(1000000007);

            if (useless == 1) {
                out.println("Case #".concat(String.valueOf(i+1)).concat(": 0"));
            }

            if (second.charAt(1) == '#' || first.charAt(0) == '#') {
                out.println("Case #".concat(String.valueOf(i+1)).concat(": 0"));
            } else {
                int j;
                for (j = 1; j < first.length(); ++j) {
                    if (second.charAt(j) == '#') {
                        out.println("Case #".concat(String.valueOf(i+1)).concat(": 0"));
                        break;
                    }
                    if (j % 2 != 0) {
                        ansLR = ansUD;
                    } else {
                        if (sameBlock(first, third, j)) {
                            out.println("Case #".concat(String.valueOf(i+1)).concat(": 0"));
                            break;
                        }

                        else if ((first.charAt(j) == '#'  || third.charAt(j) == '#' || first.charAt(j-1) == '#' || third.charAt(j-1) == '#')) {
                            ansUD = ansLR;
                        }
                        else {
                            if (j == 2) {
                                ansUD = BigInteger.valueOf(2);
                            } else {
                                ansUD = modulo(ansUD, BigInteger.valueOf(2), exp);
                            }
                        }
                    }

                }
                if (j == first.length()) {
                    if (useless % 2 == 0) {
                        out.println("Case #".concat(String.valueOf(i + 1)).concat(": ").concat(String.valueOf(ansLR)));
                    } else {
                        out.println("Case #".concat(String.valueOf(i + 1)).concat(": ").concat(String.valueOf(0)));
                    }
                }
            }

        }
    }

    private BigInteger modulo(BigInteger a, BigInteger b, BigInteger c) {
        BigInteger t1 = a.mod(c);
        BigInteger t2 = b.mod(c);
        BigInteger t3 = t1.multiply(t2);
        return t3.mod(c);

//        BigInteger x= BigInteger.valueOf(1);
//        BigInteger y=a;
//        while(b.compareTo(BigInteger.valueOf(0)) > 0){
//            if(b.mod(BigInteger.valueOf(2)).equals( BigInteger.valueOf(1))){
//                x= x.multiply(y).mod(c);
//            }
//            y = y.multiply(y).mod(c); // squaring the base
//            b = b.divide(BigInteger.valueOf(2));
//        }
//        return x.mod(c);
    }

    private boolean sameBlock(String f, String t, int j) {
        return f.charAt(j) == '#' && t.charAt(j) == '#' || f.charAt(j) == '#' && t.charAt(j - 1) == '#' || f.charAt(j - 1) == '#' && t.charAt(j) == '#';
    }





    void run() throws Exception {
        is =  System.in;

        //is = new BufferedInputStream(new FileInputStream("./input.txt"));

        out = new PrintWriter(System.out);

        //out = new PrintWriter(new BufferedWriter(new FileWriter("./output.txt")));

        long s = System.currentTimeMillis();
        solve();
        //inputThird();
        out.close();
        //tr(System.currentTimeMillis()-s+"ms");
    }

    public static void main(String[] args) throws Exception {
        new Main().run();
    }

    private byte[] inbuf = new byte[1024];
    public int lenbuf = 0, ptrbuf = 0;

    private int readByte() {
        if(lenbuf == -1)throw new InputMismatchException();
        if(ptrbuf >= lenbuf){
            ptrbuf = 0;
            try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
            if(lenbuf <= 0)return -1;
        }
        return inbuf[ptrbuf++];
    }

    private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
    private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }
    private boolean isNewLineChar(int c) { return c == 10;}

    private double nd() { return Double.parseDouble(ns()); }
    private char nc() { return (char)skip(); }

    private String ns() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private String nsTillNewLine() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while(!(isNewLineChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private String nsF() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while((isSpaceChar(b)) && b!=' '){ // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private char[] ns(int n) {
        char[] buf = new char[n];
        int b = skip(), p = 0;
        while(p < n && !(isSpaceChar(b))){
            buf[p++] = (char)b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }

    private char[][] nm(int n, int m) {
        char[][] map = new char[n][];
        for(int i = 0;i < n;i++)map[i] = ns(m);
        return map;
    }

    private int[] na(int n) {
        int[] a = new int[n];
        for(int i = 0;i < n;i++)a[i] = ni();
        return a;
    }

    private int ni() {
        int num = 0, b;
        boolean minus = false;
        while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
        if(b == '-'){
            minus = true;
            b = readByte();
        }

        while(true){
            if(b >= '0' && b <= '9'){
                num = num * 10 + (b - '0');
            }else{
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private long nl() {
        long num = 0;
        long b;
        boolean minus = false;
        while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
        if(b == '-'){
            minus = true;
            b = readByte();
        }

        while(true){
            if(b >= '0' && b <= '9'){
                num = num * 10 + (b - '0');
            }else{
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private boolean oj = System.getProperty("ONLINE_JUDGE") != null;
    private void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}