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