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.util.Arrays;
import java.util.StringTokenizer;

public class Many_Equal {
    public static void main(String[] args) {

        FastReader in = new FastReader();
        OutputStream outputStream = System.out;
        PrintWriter out = new PrintWriter(outputStream);
        int i,j,a = 0,b,c,n,k,l,m;
        boolean is = false, is1 = false;
        String s,s1,s2,s3;
        StringBuilder stringBuilder;
        long sum = 0;
        int[] brr = new int[1];
        int[] arr = new int[26];


        //mergeSort(arr, 0, 7);
        n = in.nextInt();
        k = in.nextInt();

        s = in.nextLine();


        for (i=1,j = n-1; i<n; i++,j--){

            s1 = s.substring(0,i);
            s2 = s.substring(j,n);

            if (s1.equals(s2)){
                a = i;
            }

        }
       // out.println(a);
        s2 = "";

        s1 = s.substring(0,n-a);
        s3 = s.substring(n-i,n);
       // out.println(a + " " + s1);

     /*   20 3
        sfrpmsfrpmsfrpmsfrpm
*/

        for (i=0; i<k-1; i++){
            s2 += s1;
        }

        out.println(s2+s3);


//        for (i=0; i<n; i++)
//            arr[s.charAt(i) - 97]++;
//
//        for (i=0; i<26; i++)
//        {
//            if (arr[i] > 0 && !is){
//                is = true;
//                arr[i] = 0;
//            }
//            if (is && arr[i] > 0){
//                is1 = true;
//            }
//        }
//
//        if (is && is1){
//
//            if (s.charAt(0) == s.charAt(n-1)){
//                l = s.length() / 2;
//
//                for (i=0,j=n-1; i<l; i++,j--){
//
//                    if (s.charAt(i) == s.charAt(j) && s.charAt(i) == s.charAt(0)){
//
//                    }
//                    else break;
//
//                }
//
//
//                s1 = s.substring(0,n-i);
//                s3 = s.substring(s1.length(),n);
//                //out.println(s1 + " " + s3);
//                s2 = s1;
//
//                for (j=0; j<k-1; j++){
//                    s2 += s1;
//                }
//
//                out.println(s2+s3);
//                out.flush();
//            }
//
//            else {
//                for (i=0; i<k; i++)
//                    out.print(s);
//                out.println();
//                out.flush();
//            }
//
//
//        }
//        else {
//
//            char x = s.charAt(0);
//            out.print(s);
//            for (i=0; i<k-1; i++){
//                out.print(x);
//            }
//            out.println();
//            out.flush();
//
//        }

        out.flush();


    }



    static void  mergeSort(int arr[], int l, int r)
    {
        if (l < r)
        {
            // Same as (l+r)/2, but avoids overflow for
            // large l and h
            int m = l+(r-l)/2;

            // Sort first and second halves
            mergeSort(arr, l, m);
            mergeSort(arr, m+1, r);

            merge(arr, l, m, r);
        }
    }


    static void merge(int arr[], int l, int m, int r)
    {
        int i, j, k;
        int n1 = m - l + 1;
        int n2 =  r - m;

        /* create temp arrays */
        int L[] = new int[n1],  R[] = new int[n2];

        /* Copy data to temp arrays L[] and R[] */
        for (i = 0; i < n1; i++)
            L[i] = arr[l + i];
        for (j = 0; j < n2; j++)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays back into arr[l..r]*/
        i = 0; // Initial index of first subarray
        j = 0; // Initial index of second subarray
        k = l; // Initial index of merged subarray
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                j++;
            }
            k++;
        }

    /* Copy the remaining elements of L[], if there
       are any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

    /* Copy the remaining elements of R[], if there
       are any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }






    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

}