Valera had two bags of potatoes, the first of these bags contains x (x ≥ 1) potatoes, and the second — y (y ≥ 1) potatoes. Valera — very scattered boy, so the first bag of potatoes (it contains x potatoes) Valera lost. Valera remembers that the total amount of potatoes (x + y) in the two bags, firstly, was not gerater than n, and, secondly, was divisible by k.

Help Valera to determine how many potatoes could be in the first bag. Print all such possible numbers in ascending order.


-----Input-----

The first line of input contains three integers y, k, n (1 ≤ y, k, n ≤ 10^9; $\frac{n}{k}$  ≤ 10^5).


-----Output-----

Print the list of whitespace-separated integers — all possible values of x in ascending order. You should print each possible value of x exactly once.

If there are no such values of x print a single integer -1.


-----Examples-----
Input
10 1 10

Output
-1

Input
10 6 40

Output
2 8 14 20 26

Difficulty: interview

Starter code:

Solutions:
import sys
f = sys.stdin
# f = open("input.txt", "r")
y, k, n = map(int, f.readline().strip().split())

if y >= n:
    first = -1
else:
    t = k
    while t <= y:
        t += k
    first = t-y
if first == -1:
    print(-1)
else:
    if first+y > n:
        print(-1)
    else:
        res = []
        for i in range(first, n+1-y, k):
            res.append(i)
        print(*res)

while(1):
    try:
        y,k,n=map(int,input().split())
        start=(y//k)
        end=n//k        
        if y>=n or start==end:
            print(-1)
        else:
            for i in range(start+1,end+1):
                print(k*i-y,end=" ")
            print("")
    except EOFError:
        break

y, k, n = map(int, input().split())
x = list(range(k - y % k, n - y + 1, k))
print(' '.join(str(i) for i in x) if x else -1)

y,k,n=map(int,input().split())

a=(k-(y%k))%k
if(a==0):
    a+=k
done=False
while(a+y<=n):
    print(a,end=" ")
    done=True
    a+=k
if(not done):
    print(-1)


a=[int(i)for i in input().split()]
b=range(a[2]+1)
c=b[0::a[1]]
c=[i-a[0] for i in c]
c=[i for i in c if i>0]
if c==[]:print(-1)
else:print(' '.join([str(i)for i in c]))

import sys
import math
  
y, k, n = [int(x) for x in (sys.stdin.readline()).split()]

t = []

p = int(n / k)
z = p * k - y
if(z <= 0):
    print(-1)
    return
    
t.append(str(z))
while(z - k > 0):
    z -= k
    t.append(str(z))
    
print(" ".join(t[::-1]))

y, k, n = [int(x) for x in input().split()]
first = (y // k + 1) * k
if first > n:
	print(-1)
	return
l = []
for x in range(first, n + 1, k):
	l.append(str(x - y))
print(' '.join(l))


def main():
    y, k, n = map(int, input().split())
    x = (-y) % k
    if not x:
        x = k
    res = list(range(x, n - y + 1, k))
    if not res:
        res.append(-1)
    print(' '.join(map(str, res)))


def __starting_point():
    main()
__starting_point()

do_cf = False
import math
a,b,c=list(map(int,input().split(' ')))
x = math.floor(c/b)
dead = x * b
deaded = b*math.ceil(a/b)
strx = ''
for i in range(deaded, dead+1, b):
    if i-a>0:
        do_cf= True
        strx += ' ' + str(i-a)
if do_cf:
    print(strx)
else:
    print("-1")


a = input().split()
y = int(a[0])
k = int(a[1])
n = int(a[2])

xl = []
xf = -1

div = n//k
mul = div*k
xmax = mul - y

if xmax <1:
    print(-1)
else:
    xl.append(xmax)
    while True:
        xmax -= k
        if xmax<1:
            break
        xl.append(xmax)

    xl.sort()
    ans = ""
    for k in xl:
        ans+= str(k)+" "
    print(ans)


def foo():
   inp = input()
   y, k, n = inp.split()
   y = int(y)
   k = int(k)
   n = int(n)

   count = y // k
   count += 1

   cur = count * k
   if (cur > n):
      print(-1)
   while cur <= n:
      print(cur - y, end = ' ')
      cur += k

foo()

from functools import reduce
from operator import *
from math import *
from sys import *
setrecursionlimit(10**7)
RI=lambda: list(map(int,input().split()))
RS=lambda: input().rstrip().split()
#################################################
y,k,n=RI()
st=k-y%k
if st+y>n:
	print(-1)
else:
	while 1:
		if st+y>n:
			break
		print(st,end=" ")
		st+=k


data = input().split()

Y, K, N = int(data[0]), int(data[1]), int(data[2])

answer = []
i = K
while i <= N:
    if i > Y:
        answer.append(i - Y)
    i += K


if len(answer) == 0:
    print('-1')
else:
    print(" ".join(map(str, answer)))


data = input().split()

Y, K, N = int(data[0]), int(data[1]), int(data[2])

answer = []
i = K
while i <= N:
    if i > Y:
        answer.append(i - Y)
    i += K

if len(answer) == 0:
    print('-1')
else:
    print(" ".join(map(str, answer)))


'''
Created on Apr 27, 2016
Gmail : r.haque.249.rh@gmail.com
@author: Md. Rezwanul Haque
'''
'''
Created on Apr 27, 2016
Gmail : r.haque.249.rh@gmail.com
@author: Md. Rezwanul Haque
'''
import sys
f = sys.stdin
# f = open("input.txt", "r")
y, k, n = map(int, f.readline().strip().split())

if y >= n:
    first = -1
else:
    t = k
    while t <= y:
        t += k
    first = t-y
if first == -1:
    print(-1)
else:
    if first+y > n:
        print(-1)
    else:
        res = []
        for i in range(first, n+1-y, k):
            res.append(i)
        print(*res)

y, k, n = map(int, input().split())
temp = int(y / k)
temp += 1
temp = temp * k
#print (temp)
if temp > n:
	print (-1)
	return
while temp <= n:
	print (temp - y, end = ' ')
	temp += k
print ()


import math
y, k, n = list(map(int, input().split()))
# x+y<n k|x+y x+y=ka ka<n a<n/k a= 0 to floor(n/k)
# ki-y>=1 i>=(y+1)/k
l = [k * i - y for i in range(math.ceil((y + 1) / k), n // k+1)]
if len(l) is 0:
    print(-1)
else:
    print(' '.join(map(str, l)))


y,k,n=[int(i) for i in input().split()]

a=y%k
m=[]
for i in range(n):
    h=i*k-a
    num=h+y
    if num<=n:
        if h>0:
            m.append(h)
    else:break
if len(m)>0:
    print(*m)
else:print(-1)




def __starting_point():
    y, k, n = str(input()).split()
    y = int(y)
    k = int(k)
    n = int(n)
    res = list()
    head = y // k
    tail = n // k
    for i in range(head, tail + 1):
        v = i * k
        if y < v <= n:
            res.append(str(v - y))
    if len(res) > 0:
        print(' '.join(res))
    else:
        print(-1)

__starting_point()

import math
inputs=[int(x) for x in input().split()]
y=inputs[0]
k=inputs[1]
n=inputs[2]
result=''
x=k-(y%k)
i=x
while i+y<=n:
    result+=str(i)+' '
    i+=k
if len(result):
    print(result[0:len(result)-1])
else:
    print('-1')


import math
inputs=[int(x) for x in input().split()]
y=inputs[0]
k=inputs[1]
n=inputs[2]
result=''
x=k-(y%k)
i=x
while i+y<=n:
    result+=str(i)+' '
    i+=k
if len(result):
    print(result[0:len(result)-1])
else:
    print('-1')


y, k, n = input().split()
check = False
y, k, n = [int(y), int(k), int(n)] 
if y >= k:
    a = k-y%k
    for i in range(a, n, k):
        if i+y <= n:
            print(i, end = ' ')
            check = True
        else:
            break
elif y < k:
    a = k-y
    for i in range(a, n, k):
        if i+y <= n:
            check = True
            print(i, end = ' ')
        else:
            break

if check == False:
    print("-1")


y, k, n = list(map(int, input().split()))
A = n // k * [0]
pos = 0
for i in range(1, n // k + 1):
    x = i * k - y
    if (1 <= x):
        A[pos] = x
        pos += 1
if (pos == 0):
    print(-1)
else:
    print(' '.join(map(str, A[:pos])))