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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


import java.util.*;

public class A_GENERAL {
    
	public static void main(String[] args) {
		
		MyScanner sc = new MyScanner();
        int n = sc.nextInt();
        int k = sc.nextInt();
        String t = sc.next();
        if(t.chars().distinct().count() == 1) {
            if(t.length() == 1) 
                System.out.println(String.valueOf(new char[k]).replace("\0", String.valueOf(t.charAt(0))));
            else 
                System.out.println(String.valueOf(new char[t.length() + k - 1]).replace("\0", String.valueOf(t.charAt(0))));
            return;
        }
        String start = String.valueOf(t.charAt(0));
        int ind = 0;
        String s = "";
        String tmp = t.substring(0, n-1);
        
        while((ind = t.indexOf(start, ind+1)) != -1) {
        	boolean flag = true;
        	for(int i = 0; i < ind-1 && i+ind < n; i++) {
        		if(t.charAt(i) != t.charAt(i+ind)) {
        			flag = false;
        		}
        	}
        	if(n%2 == 0 && 2*ind-1 < n && t.charAt(ind-1) != t.charAt(2*ind-1)) {
        		flag = false;
        	}
        	if(flag) {
        		s = t.substring(0, ind);
//        		System.out.println(s);
//        		System.out.println(t.replace(s, "").length());
        		if(t.replace(s, "").length() == 0) {
//        			System.out.println("true");
        			break;
        		}
        		if(n%2 == 1) {
        			if(t.charAt(0) == t.charAt(n-1)) {
	        			if(tmp.replace(s, "") == "") {
	        				break;
	        			} 
        			}
        		}
        		s = t.substring(0, ind);
//    			System.out.println("t = " + t);
//    			System.out.println("ind = " + ind);
//    			System.out.println("1 = "+s);
    			String td = t.replace(s, "");
//    			System.out.println("2 = " + td);
    			if(s.startsWith(td)) {
    				break;
    			}
        		s = "";
        	}
        }
//        System.out.println("s = " + s);
        if(s == "") {
        	if(t.charAt(0) == t.charAt(n-1)) {
        		System.out.println(String.valueOf(new char[k]).replace("\0", tmp) + t.charAt(0));
        	} else {
        		System.out.println(String.valueOf(new char[k]).replace("\0", t));
        	}
        } else {
//        	if(n%s.length() == 0) {
//        		System.out.println(String.valueOf(new char[n/s.length() + k-1]).replace("\0", s));
//        	} else {
    		System.out.println(String.valueOf(new char[n/s.length() + k-1]).replace("\0", s) + t.replace(s, ""));
//        	}
        }
	}
	
	public static class MyScanner {
		BufferedReader br;
		StringTokenizer st;
		public MyScanner() {
			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;}
	}
	
}