S = input() T = input() N = int(input()) print(S,end = "") for _ in range(N): print("_",end = "") pirnt(T,end = "") print()