s, h, t = list(map(str, input().split())) if s != h and t == "1": print(-1) elif t == "1": print(s) else: print(s + "a" * (int(t)-2) + h)