s, e, N = input().split() N = int(N) if N == 1 and s != e: print(-1) else: print(s + "a" * (N - 2) + e)