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