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