#include<bits/stdc++.h>
#define ll long long
using namespace std;
ll a,b;
string s;
int main(){
   cin>>a>>b>>s;
   if(abs(a-b)>1){
      cout<<"nemoguce"<<endl;
      return 0;
   }
   if(a==b){
      for(int i=1;i<=a;i++)
         cout<<s;
      cout<<endl;
      return 0;
   }
   if(a>b){
      cout<<s[0];
      for(int i=1;i<a;i++)
         cout<<s;
      cout<<endl;
      return 0;
   }
   cout<<s[1];
   for(int i=1;i<=a;i++)
      cout<<s;
   cout<<endl;
   return 0;
}