A, B, C = map(int, input().split()) possible_N = [] for N in range(1, B+C): num = N num *= A # 兄が整数をA倍する num -= B # 弟が整数からBを引く if num <= 0: continue if num == C: possible_N.append(N) if len(possible_N) > 0: for N in possible_N: print(N) else: print(-1)