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