#include using namespace std; using ll = long long; template using V = std::vector; #define REP(i, n) for (ll i = (ll)0; i < (ll)(n); i++) #define REPS(i, s, n) for (ll i = (ll)(s); i < (ll)(n); i++) #define RREP(i, n) for (ll i = (ll)(n); i > (ll)0; i--) #define RREPS(i, s, n) for (ll i = (ll)(n); i > (ll)(s); i--) #define ALL(c) std::begin((c)), std::end((c)) struct io { io() { cin.tie(0)->sync_with_stdio(0); } } caller; int main() { string s, t; int n; cin >> s >> t >> n; cout << s; REP (i, n) cout << "_" + t; cout << endl; return 0; }