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