#include using namespace std; using ll = long long; #define fi first #define se second int main(){ string s, t; int n; cin >> s >> t >> n; for(int i = 0; i < n; i++){ s.push_back('_'); s += t; } cout << s << endl; return 0; }