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