#include <iostream>
#include <string>
using namespace std;
string rec;
int main() {
    int x, y;
        cin>>rec;
            cin>>x;
                cin>>y;
                    int i=0;
                        int i1=x, i2=y;
                            
                                if(abs(x-y)>1){
                                        cout<<"nemoguce"<<'\n';
                                            }else{
                                                    while(i<i1 && i<i2){
                                                                cout<<rec[0]<<rec[1];
                                                                            i++;
                                                                                    }
                                                                                        }
                                                                                            

                                                                                              return 0;
                                                                                              }