https://codeforces.com/contest/1029/problem/A

/*
*@Author:   STZG
*@Language: C++
*/
#include <bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<cstdio>
#include<string>
#include<vector>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<cmath>
#include<list>
#include<map>
#include<set>
//#define DEBUG

using namespace std;
typedef long long ll;
const int N=10000;
const double PI = acos(-1.0);
const double EXP = 1E-8;
const int INF = 0x3f3f3f3f;
int t,n,m,k;
char str[N];
int main()
{
#ifdef DEBUG
	freopen("input.in", "r", stdin);
	//freopen("output.out", "w", stdout);
#endif
    scanf("%d%d",&n,&k);
    scanf("%s",str);
    int cnt=0;
    int len=strlen(str);
    int flag=0;
    for(int i=1;i<len;i++){
        int temp=i;
        int top=0;
        while(str[top]==str[temp]){
            top++;
            temp++;
            if(temp==len){
                flag=top;
                break;
            }
        }
        if(flag)
            break;
    }
    if(flag){
        for(int j=0;j<flag;j++)
                printf("%c",str[j]);
        for(int i=1;i<=k;i++)
            for(int j=flag;j<len;j++)
                printf("%c",str[j]);
    }else{
        for(int i=1;i<=k;i++)
            printf("%s",str);

    }
    cout << endl;
    //cout << "Hello world!" << endl;
    return 0;
}