A, B, C = gets.split.map(&:to_i) res = [*1..100_000].select { |n| v = n * A; v -= B if v > B; v == C } if res.empty? puts -1 else puts res end