#include <bits/stdc++.h>
using namespace std;
int a,b,g;
string s,s1,s2;
int main () {
    cin>>s>>a>>b;
    if(abs(a-b)<=1){
        for(int i=1;i<=min(a,b);i++){
            cout<<s;
        }
    }
    else cout<<"nemoguce"<<endl;
    return 0;
}