S, E, N = input().split() N = int(N) if 2 <= N or S == E: if N == 1: print(S) else: print(S*(N-1)+E) else: print(-1)