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