Problem:
 Score : 200 points    Problem Statement Print all the integers that satisfies the following in ascending order:   Among the integers between A and B (inclusive), it is either within the K smallest integers or within the K largest integers.       Constraints  1 \leq A \leq B \leq 10^9  1 \leq K \leq 100  All values in input are integers.         Input Input is given from Standard Input in the following format:  A  B  K       Output Print all the integers that satisfies the condition above in ascending order.        Sample Input 1 3 8 2      Sample Output 1 3
4
7
8   3 is the first smallest integer among the integers between 3 and 8 .  4 is the second smallest integer among the integers between 3 and 8 .  7 is the second largest integer among the integers between 3 and 8 .  8 is the first largest integer among the integers between 3 and 8 .        Sample Input 2 4 8 3      Sample Output 2 4
5
6
7
8       Sample Input 3 2 9 100      Sample Output 3 2
3
4
5
6
7
8
9

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    a,b,k = LI()
    s = set()
    for i in range(a,a+k):
        if i > b:
            break
        s.add(i)
    for i in range(b-k+1,b+1):
        if i < a:
            continue
        s.add(i)


    return '\n'.join(map(str, sorted(list(s))))


print(main())

Solution (Python):
A,B,K=map(int,input().split())
X=[i for i in range(A,min(B,A+K))]+[j for j in range(max(A,B-K+1),B+1)]
X=sorted(list(set(X)))
for x in X:print(x)

Solution (Python):
a,b,k = map(int,input().split())

if b-a+1 <= 2*k:
    for i in range(b-a+1):
        print(a+i)
else:
    for i in range(k):
        print(a+i)
    for i in range(k):
        print(b-k+1+i)

Solution (Python):
if __name__ == '__main__':
	s = input().split(' ')
	a = int(s[0])
	b = int(s[1])
	k = int(s[2])


	l1 = [a+x for x in range(k) if a+x <= b]
	l2 = [b-x for x in range(k) if b-x >= a]
	nums = set(l1+l2)

	for elm in sorted(nums):
		print(elm)

Solution (Python):


a, b, k = map(int, input().split())
if k > b - a:
    for i in range(a, b+1):
        print(i)
else:
    low = [i for i in range(a, a+k)]
    high = [i for i in range(b-k+1, b+1)]
    high_removed = [i for i in high if i not in low]
    for l in low:
        print(l)
    for h in high_removed:
        print(h)

Solution (Python):
a, b, k = map(int, input().split())
s = set()
if b - a == 0:
    print(a)
elif b - a + 1 <= k:
    print(*range(a, b + 1), sep="\n")
else:
    for i in range(k):
        s.add(a + i)
        s.add(b - i)
    s = sorted(s)
    print(*s, sep="\n")

Solution (Python):

A, B, K = map(int, raw_input().split())

ret = []
i = A
while i <= min([A+K-1,B]):
    ret.append(i)
    i = i + 1
i = max([B-K+1,A])
while i <= B:
    ret.append(i)
    i = i + 1

ret.sort()
b_i = A - 1
for i in ret:
    if i != b_i:
        print i
    b_i = i

Solution (Python):
a,b,k=map(int,list(input().split(" ")))
if b-a+1 <= k*2:
   for i in range(a,b+1):
      print(i)
else:
   for i in range(a,a+k):
      print(i)
   for i in range(b-k+1,b+1):
      print(i)

Solution (Python):
A,B,K = map (int, input().split())
l = []
if A+K > B+1:
    for i in range(A,B+1):
        if i < A+K or B - K < i:
            l.append(i)
else :
    for i in range(A,A+K):
        if i < A+K or B - K < i:
            l.append(i)
if A+K-1 >= B - K+1:
    for i in range(A+K,B+1):
        l.append(i)
else :
    for i in range(B-K+1,B+1):
        l.append(i)


for i in l:
    print(i)

Solution (Python):
a, b, k = map(int,input().split())

for i in range(k):
    if b >= a+i:
        print(a+i)
for i in range(k):
    if a+k-1 < b+i-k+1:
        print(b+i-k+1)

Solution (Python):

                                        
ABK = [int(i) for i in input().split()] 
A, B, K = ABK[0], ABK[1], ABK[2]        
                                        
if (B - A)/2 >= K:                       
  for i in range(A, A+K):               
    print(i)                            
  for i in range(B-K+1, B+1):           
    print(i)                            
                                        
else:                                   
  for i in range(A, B+1):               
    print(i)

Solution (Python):
a,b,k = list(map(int, input().split()))
for i in range(a, min(a+k, b+1)):
  print(i)
for i in range(max(a+k,b-k+1),b+1):
  print(i)

Solution (Python):
a,b,k = map(int,input().split())
if (b-a)<2*k:
	for i in range(a,b+1):
		if (i-a)<k or (b-i)<k:
			print(i)
else:
	for i in range(0,k):
		print(a+i)
	for i in range(k-1,-1,-1):
		print(b-i)

Solution (Python):

A,B,K = map(int, input().split())

sub = B - A + 1
if K*2 >= sub:
	for i in range(A, B+1):
		print(i)
else:
	for i in range(A, A+K):
		print(i)
	for i in range(B-K+1, B+1):
		print(i)

Solution (Python):
a,b,k=[int(i)for i in input().split()]
if 2*k<b-a+1:
    for i in range(k):
        print(a+i)
    for i in range(k):
        print(b-k+i+1)
else:
    for i in range(b-a+1):
        print(a+i)

Solution (Python):
a,b,k = map(int,input().split())
def solve_b(a,b,k):
    if b - a >= 2 * k:
        for i in range(a,a+k):
            print(i)
        for j in range(b-k+1,b+1):
            print(j)
    else:
        for i in range(a,b+1):
            print(i)
solve_b(a,b,k)

Solution (Python):
a,b,k = map(int, input().split())
for i in range(a, min(a+k, b+1)):
  print(i)
for i in range(max(a+k,b-k+1),b+1):
  print(i)

Solution (Python):
a, b, k = map(int, input().split())
if a + k > b:
  a_k = b
else:
  a_k = a + k

if b - k < a:
  b_k = a
else:
  b_k = b - k
  
if a == b:
  a_k = a + 1
  b_k = b + 1

result = list(set([i for i in range(a, a_k)] + [i for i in range(b_k + 1, b + 1)]))
result.sort()
for n in result:
  print(n)

Solution (Python):
a, b, k = map(int, input().split())

if b - a <= 2*k - 1:
  print(*range(a, b+1), sep="\n")
else:
  print(*range(a, a+k), sep="\n")
  print(*range(b-k+1, b+1), sep="\n")

Solution (Python):
a, b, k = map(int, raw_input().strip().split())

for i in xrange(a, min(b + 1, a + k)):
    print i

for i in xrange(max(a + k, b - k + 1), b + 1):
    print i

Solution (Python):

A, B, K = map(int, input().split())
for i in range(A, min(B + 1, A + K)):
    print(i)
for i in range(max(0, B - K + 1), B + 1):
    if i < A + K:
        continue
    print(i)

Solution (Python):
a,b,k = list(map(int, input().split()))

c=b-a+1

a1=[]
b1=[]

for i in range(k):
    a1.append(a+i)
    b1.append(b-i)

if c>2*k-1:
    for i in range(k):
        print(a1[i])
    for i in range(k):
        print(b1[k-i-1])

else:
    for i in range(a,b+1):
        print(i)

Solution (Python):
a = input().split()

for i in range(len(a)):
 a[i] = int(a[i])

mina = a[0]
maxa = a[1]
numbers = a[2]

for i in range(mina,mina+numbers):
 if i <= maxa:
  print (i)

for j in range(maxa-numbers+1,maxa+1):
 if j> i:
  print (j)

Solution (Python):
a, b, k = list(map(int, input().split()))

s = []

if b - k + 1 > a + k - 1:
    for i in range(k):
        s.append(a + i)
    for i in reversed(range(k)):
        s.append(b - i)
else:
    for i in range(a, b+1):
        s.append(i)

for i in range(len(s)):
    print(s[i])

Solution (Python):
A, B, K = list(map(int, input().split()))
x = [A+i for i in range(K) if A+i <= B]
y = [B-i for i in range(K) if B-i >= A]
z = sorted(list(set(x + y)))
for a in z:
    print(a)

Solution (Python):
a, b, k = map(int, input().split())

if k > b - a:
    k = b - a + 1

nums = list(range(a, a + k)) + list(range(b - k + 1, b + 1))

nums = sorted(list(set(nums)))

for num in nums:
    print(num)

Solution (Python):



A, B, K = list(map(int, input().split(' ')))

out = [i for i in range(A, min(A + K, B + 1))]
out += [i for i in range(max(B - K + 1, A + K), B + 1)]

print(*out, sep='\n')

Solution (Python):
A, B, K = [int(i) for i in input().split()]

if (B - A) < 2*K-1:
    for i in range(A, B+1):
        print(i)
else:
    C = set(range(A, A+K))
    for i in range(B-K+1, B+1):
        C.add(i)
    C = list(C)
    C.sort()
    for i in C:
        print(i)

Solution (Python):
a, b, k = list(map(int, input().split()))
ret = []

for i in range(a, a + k):
    if i <= b and ret.count(i) == 0:
        ret.append(i)

for i in range(b - k + 1, b + 1):
    if i >= a and ret.count(i) == 0:
        ret.append(i)

for i in ret:
    print(i)

Solution (Python):
a,b,k =map(int, input().split())
c=list(range(a,a+k))
d=list(range(b-k+1,b+1))
e=list(set(c+d))
e.sort()
for i in e:
    if a<=i<=b:
        print(i)

Solution (Python):
def extract_num(n):
    n_set.add(n)


A, B, K = map(int, input().rstrip().split())
n_set = set()

cnt = 0
for n in range(A, B+1):

    extract_num(n)

    cnt += 1
    if cnt >= K:
        break

cnt = 0
for n in range(B, A-1, -1):

    extract_num(n)

    cnt += 1
    if cnt >= K:
        break

n_set = sorted(n_set)

for n in n_set:
    print(n)

Solution (Python):
A, B, K = [int(i) for i in input().split()]

out = set()
for i, j in enumerate(range(A, B + 1)):
    if i + 1 > K:
        break
    out.add(j)
for i, j in enumerate(range(B, A, -1)):
    if i + 1 > K:
        break
    out.add(j)

for i in sorted(list(out)):
    print(i)

Solution (Python):


a,b,k=map(int,raw_input().split())
for i in xrange(a,min(b,a+k-1)+1):
 print i
for i in xrange(max(b-k+1,a+k),b+1):
 print i

Solution (Python):
a, b, k = map(int, raw_input().split())
print '\n'.join(map(str, sorted(list(set(range(a, min(b + 1, a + k))) | set(range(b, max(b - k, a - 1), -1))))))

Solution (Python):
A, B, K = map(int, input().split())

if (B-A)/2 >= K: 
    for i in range(A, A+K):
        print(i)
    for i in range(B-K+1, B+1):
        print(i)
else:
    for i in range(A, B+1):
        print(i)

Solution (Python):
A,B,K = map(int,input().split())
for i in range(min(K,B-A+1)):
    print(A+i)
for i in range(max(B-K+1,A+K),B+1):
    print(i)

Solution (Python):
A, B, K = map(int, input().split())

ret = set()
for i in range(A, A + K):
    if i <=B:
        ret.add(i)

for j in range(B - K + 1, B + 1):
    if j >= A:
        ret.add(j)

for n in sorted(list(ret)):
    print(n)

Solution (Python):

if __name__ == "__main__":
    a,b,k = map(int, input().split())
    ans = []
    if b-a+1 >= 2*k:
        for tmp in range(a, a+k):
            ans.append(tmp)
        for tmp in range(b-k+1,b+1):
            ans.append(tmp)
    else:
        for tmp in range(a, b+1):
            ans.append(tmp)
    ans.sort()
    for tmp in ans:
        print(tmp)

Solution (Python):
a, b, k = map(int, input().split())

if b-a+1 >= 2*k:
    for i in range(k):
        print(a+i)

    for i in range(k-1, -1, -1):
        print(b-i)

else:
    for i in range(a, b+1):
        print(i)

Solution (Python):
A, B, K = map(int, input().split())
*p, = range(A, min(B+1, A+K))
*q, = range(max(A, B-K+1),B+1)
print(*sorted(set(p+q)), sep='\n')

Solution (Python):
a, b, k = [int(i) for i in input().split()]
s = set()
for i in range(a, a+k):
    if i in range(a, b+1):
        s.add(i)

for i in range(b-k+1, b+1):
    if i in range(a, b+1):
        s.add(i)

for i in sorted(list(s)):
    print(i)

Solution (Python):
inpt = map(int, raw_input().split())

for i in range(inpt[0], inpt[0]+inpt[2]):
	if i > inpt[1]: break
	print i
for i in range(inpt[1]-inpt[2]+1, inpt[1]+1):
	if i >= inpt[0]+inpt[2]:
		print i

Solution (Python):
a, b, k = map(int, input().split())
a_upper = min(b, a+k-1)
b_lower = max(a, b-k+1)
u = set(range(a, a_upper+1))
v = set(range(b_lower, b+1))
for i in sorted(list(u|v)):
  print(i)

Solution (Python):
def solve(a, b, c):
    if (b - a + 1 < c):
        c = b - a + 1
    d = list(range(a, a+c))
    e = list(range(b-c+1,b+1))
    f = d+e
    g = list(set(f))
    g.sort()
    h = list(map(str, g))
    return h

a, b, c = map(int, input().split())

ans = solve(a, b, c)

print("\n".join(ans) + "\n")

Solution (Python):
A,B,K = map(int,input().split())
print(*sorted(list(set([A+i for i in range(K) if A+i <= B]) | set([B-i for i in range(K) if B-i >= A]))), sep='\n')

Solution (Python):
import sys













S = input()
S = S.split(' ')






A = int(S[0])
B = int(S[1])
K = int(S[2])

ANS = []
for i in range(K):
    if A + i <= B:
        ANS.append(A + i)


for j in range(K):
    if B - j not in ANS and B - j >= A:
        ANS.append(B - j)

ANS.sort()



for i in range(len(ANS)):
    print(ANS[i])

Solution (Python):
A, B, K = map(int, input().split())
x = A
while x < A+K and x <= B:
    print(x)
    x += 1
for y in range(max(x, B-K+1), B+1):
    print(y)

Solution (Python):
A,B,K = map(int, input().split())

if (B-A)>=2*K:
    for i in range(A,A+K,1):
        print(i)
    for j in range(B-K+1,B+1,1):
        print(j)

else:
    for k in range(A,B+1,1):
        print(k)

Solution (Python):
a, b, n = map(int,input().split())
for i in range(a, a + n + 1):
    if i > b - n:
        break
    if i <= a + n - 1:
        print(i)
    
for j in range(b - n, b + 1):
    if i > b:
        break
    if j >= b - n + 1 and a <= j:
        print(j)

Solution (Python):
A, B, K = map(int, input().split())
K2=B-A+1
K3=K2-K*2
if K3 > 0:
    for i in range (K):
        print ('%d'%(A+i))
    for i in range (K):
        print ('%d'%(B-K+i+1))
if K3 <= 0:
    for i in range (B-A+1):
        print ('%d'%(A+i))

Solution (Python):
a, b, k = map(int, input().split())

st = set()

for i in range(0, k):
    if a+i <= b:
        st.add(a+i)
    else:
        break

for i in range(0, k):
    if b-i >= a:
        st.add(b-i)
    else:
        break

ls = list(sorted(st))

for i in ls:
    print(i)

Solution (Python):
A, B, K = map(int, input().split())
setA = set([i for i in range(A,min(A+K,B+1))])
setB = set([i for i in range(max(A,B-K+1),B+1)])
setAB = sorted(setA | setB)
for i in list(setAB):
    print(i)

Solution (Python):
a, b, k = map(int, input().split())

if b - a + 1 > 2 * k:
    l = [int(i) for i in range(a, a + k)] + [int(j) for j in range(b - k + 1, b + 1)]
    
else:
    l = [int(i) for i in range(a, b + 1)]

for i in l:
    print(i)

Solution (Python):
a,b,k=map(int,input().split())

if b-a >= k*2:
    for i in range(a,a+k):
        print(i)
    for i in range(b-k+1,b+1):
        print(i)

else:
    for i in range(a,b+1):
        print(i)

Solution (Python):
import math
import sys

def getinputdata():

    
    array_result = []    
    data = input()
    array_result.append(data.split(" "))

    flg = True

    try:
        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = True

            else:

                flg = False
    finally:

        return array_result

arr_data = getinputdata()

a = int(arr_data[0][0])
b = int(arr_data[0][1])
k = int(arr_data[0][2])



s1=set()

cnt=0

for i in range(a,b+1):
    


    if cnt<k:
        
        s1.add(i)
        cnt+=1
    else:
        break
        
cnt=0
for i in range(b,a-1,-1):
    
    if cnt<k:
        
        s1.add(i)
        cnt+=1
    else:
        
        break
        

list01=sorted(list(s1),reverse=False)


print("\n".join(list(map(str, list01))))

Solution (Python):
a,b,k = map(int, input().split())
if b - a + 1 > 2*k:
    for i in range(a,a+k):
        print(i)
    for i in range(b-k+1,b+1):
        print(i)
else:
    for i in range(a,b+1):
        print(i)

Solution (Python):
A, B, K = map(int, input().split())

ans = set()

for i in range(A, A+K):
    if i > B:
        break
    ans.add(i)

for i in range(B, B-K, -1):
    if i < A:
        break
    ans.add(i)
for i in sorted(list(ans)):
    print(i)

Solution (Python):
a,b,k=map(int,input().split())
lis=[]
if k<=abs(b-a+1):
    for i in range(a,a+k):
        lis.append(i)
    for j in range(b,b-k,-1):
        lis.append(j)
    lis=list(set(lis))
    lis.sort()
    for k in lis:
        print(k)
else:
    for i in range(a,b+1):
        print(i)

Solution (Python):
A, B, K = map(int,input().split())

L = B - A + 1

if L >= 2*K:
    for i in range(A, A+K):
        print(i)
    for i in range(B-K+1,B+1):
        print(i)
        
else:
    for i in range(A,B+1):
        print(i)

Solution (Python):
a, b, k = map(int, input().split())
if (b - a + 1) > 2 * k:
    for i in range(a, a + k):
        print(i)
    for i in range(b - k + 1, b + 1):
        print(i)
else:
    for i in range(a, b + 1):
        print(i)

Solution (Python):
a, b, k = list(map(int, input().split()))
ans = set()
for i in range(a, a + k):
    if i <= b:
        ans.add(i)
for i in range(b - k + 1, b + 1):
    if i >= a:
        ans.add(i)

ansL = list(ans)
ansL.sort()
for i in ansL:
    print(i)

Solution (Python):
A, B, K = map(int, input().split(' '))

if (B - A + 1) / 2 < K:
    for i in range(A, B + 1):
        print(i)
else:
    for i in range(A, A + K):
        print(i)
    for i in range(B - K + 1, B + 1):
        print(i)

Solution (Python):
A, B, K = map(int, input().split())
ans = []
for a in range(A, min(A+K, B+1)):
    ans.append(a)
for b in range(max(A+K, B-K+1), B+1):
    ans.append(b)
print(*ans, sep="\n")

Solution (Python):
ip=[int(x) for x in input().split()]
a=ip[0];b=ip[1];k=ip[2]
ans=list()
for i in range(0,k):
    ans.append(a)
    ans.append(b)
    a=a+1
    b=b-1
    if((a>ip[1])|(b<ip[0])):
        break
res=list(set(ans))
res.sort()
for i in res:
    print(i)

Solution (Python):
A, B, K = map(int, input().split())

value = []

if B - A < K or B <= K:
    value.extend([i for i in range(A, B+1)])
    
else:
    value.extend([i for i in range(A, A+K)])
    value.extend([i for i in range(B-K+1, B+1)])    

num = list(set(value))
num.sort()

for i in range(len(num)):
    print(num[i])

Solution (Python):
A,B,K=map(int,input().split())
S=set()
for i in range(A,min([A+K,B+1])):
  S.add(i)
for i in range(max([B-K+1,A]),B+1):
  S.add(i)
T=list(S)
T.sort()
for i in T:
  print(i)

Solution (Python):
a,b,k = map(int,input().split())
ans = []

if (b-a)//2 >= k:
	for i in range(a,a+k):
		ans.append(i)
	for i in range(b-k+1,b+1):
		ans.append(i)
	ans.sort()
	for i in range(len(ans)):
		print(ans[i])
else:
	for i in range(a,b+1):
		print(i)

Solution (Python):



input_list = input().split()
start_num = int(input_list[0])
end_num = int(input_list[1])
range_num = int(input_list[2])

result_list = []
for i in range(start_num, end_num + 1):
	
	if i < start_num + range_num:
		result_list.append(i)
	else:
		break

for i in range(end_num, start_num -1, -1):
	
	if i > end_num - range_num:
		result_list.append(i)
	else:
		break


result_list = list(set(result_list))

result_list.sort()

for num in result_list:
	print(num)

Solution (Python):
lst=[]
a,b,k=map(int,input().split())
x=a
for i in range(k):
    if x<=b:
        if x not in lst:
            lst.append(x)
            x+=1
    else:
        break
x=b-k+1
for i in range(k):
    if a<x<=b and x not in lst:
        lst.append(x)
        x+=1
    else:
        x+=1

for num in lst:
    print(num)

Solution (Python):
data = list(map(int,input().split()))
a = range(data[0],data[1]+1)
if data[2] > ((data[1] - data[0] + 1)//2):
  for i in range(data[1] - data[0] + 1):
  	print(a[i])
else:
  for i in range(data[2]):
  	print(a[i])
  for j in range(data[1] - data[0] - data[2]+1, data[1]- data[0]+1):
  	print(a[j])

Solution (Python):
a,b,k = list(map(int,input().split()))


temp = []

for i in range(a,a+k):
    temp.append(i)
    if i== b:
        break

for i in range(b-k+1,b+1):
    if i < a:
        continue
    if i in temp:
        continue
    temp.append(i)

for i in temp:
    print(i)

Solution (Python):
A,B,K = map(int,input().split())
if B - A + 1 >= K:
	for a in range(A-1,A+K-1):
		a += 1
		print(a)
	for b in range(B-K,B):
		b += 1
		if b > A + K - 1:
			print(b)
else:
	for x in range(A-1,B):
		x += 1
		print(x)

Solution (Python):
s = input().split()
s = list(map(int,s))
ans = []

i = 0
while i<s[2]:
   if (i+s[0])>s[1]:
      i += 1
   elif (i+s[0])<=s[1]:
      ans.append(int(i + s[0]))
      i += 1

i = 0
while  i<s[2]:
   if (s[1]-i)>=s[0]:
       ans.append(int(s[1]-i))
       i += 1
   elif (s[1]-i)<s[0]:
       i += 1

ans = list(set(ans))
ans.sort()

for a in ans:
   print(a)

Solution (Python):
temp = input()
a,b,k = temp.split()
a = int(a)
b = int(b)
k = int(k)

box = []
for i in range(k):
    box.append(a+i)
    box.append(b-i)
out = set(box)
out = list(out)
out = [i for i in out if i>=a and i<=b]
out = sorted(out)
for i in out:
    print(i)

Solution (Python):


a, b, k = map(int, input().split())
for i in range(a, min(a + k, b + 1)):
    print(i)

for i in range(max(a + k, b - k + 1), b + 1):
    print(i)

Solution (Python):
A,B,K=map(int, raw_input().split())
c=set()
for i in range(A,min(B+1,A+K)):
	c.add(i)

for i in range(B,max(A-1,B-K),-1):
	c.add(i)


a=list(c)
a.sort()
for i in a:
	print i

Solution (Python):
ip=[int(x) for x in input().split()]
a=ip[0]
b=ip[1]
k=ip[2]
if k>=(b-a+1):
  for i in range(a,b+1):
    print(i)
else:
	lw=list(range(a,a+k))
	hg=list(range(b-k+1,b+1))
	res=list(set(lw+hg))
	res.sort()
	for i in res:
  		print(i)

Solution (Python):
A, B, K = map(int, input().split())

list2 = [ A + K - 1 , B - K + 1]
if A + K - 1 >= B - K +1 or A > B - K:
    i = A
    while i <= B:
        print(i)
        i += 1
else:
    i = A
    while i <= A + K - 1:
        print(i)
        i += 1
    i = B - K + 1
    while i <= B:
        print(i)
        i += 1

Solution (Python):
import math

A,B,K=map(int,input().split())
length=B-A+1
 
if math.ceil(length/2)>K:
    for i in range(A,A+K):
        print(i)
    for i in range(B-K+1,B+1):
        print(i)
else:
    for i in range(A,B+1):
        print(i)

Solution (Python):
C = list(int(i) for i in input().split())
A = []
B = []
for i in range(C[0], C[0]+C[2]):
    if i in range(C[0], C[1]+1):
        A.append(i)
for i in range(C[1]-C[2]+1, C[1]+1):
    if i in range(C[0], C[1]+1):
        if i not in A:
            A.append(i)
A.sort
for i in range(len(A)):
    print(A[i])

Solution (Python):
a, b, k = map(int, input().split())

s = set()
i = a
while i < b and i < a + k:
    s.add(i)
    i += 1

i = b
while i >= a and i > b - k:
    s.add(i)
    i -= 1

for x in sorted(s):
    print(x)

Solution (Python):
a, b, k = map(int, input().split())
if (b - a + 1) <= 2 * k:
	for i in range(a, b+1):
		print(i)
else:
	for i in range(a, a+k):
		print(i)
	for i in range(b-k+1, b+1):
		print(i)

Solution (Python):


A,B,K = map(int, input().split())

l,r = A+K-1,B-K+1

if l >= r:
  first = list(range(A, r))
else:
  first = list(range(A, l+1))
last  = list(filter(lambda n: n>=A, range(r, B+1)))

for n in (first + last):
  print(n)

Solution (Python):
x = list(map(int, input().split()))
res=[]

if x[0]+x[2]-1>=x[1]-x[2]:
    for i in range(x[0],x[1]+1):
        print(i)
    quit()

for i in range(x[0],x[0]+x[2]):
    res.append(i)
for i in range(x[1]-x[2]+1,x[1]+1):
    res.append(i)

for i in res:
    print(i)

Solution (Python):
master_list = list(map(int, input().split(' ')))

sabun = master_list[1] - master_list[0]

if master_list[2] >= sabun:
    next_list = [x for x in range(master_list[0], master_list[1] + 1)]
    print(*next_list, sep='\n')
else:
    a_list = [x for x in range(master_list[0], master_list[0] + master_list[2])]
    b_list = [x for x in range(master_list[1], master_list[1] - master_list[2], -1)]
    last_list = sorted(list(set(a_list) | set(b_list)))
    print(*last_list, sep='\n')

Solution (Python):
S = input().split(' ')
s1 = int(S[0])
s2 = int(S[1])
k = int(S[2])
sum = s2 - s1 + 1

if sum < k:
    for i in range(s1, s2 + 1):
        print(i)
elif sum / 2  < k:
    for i in range(s1, s2 + 1):
        print(i)
else:
    for i in range(s1, s1 + k ):
        print(i)
    for i in range(s2 - k + 1, s2 + 1):
        print(i)

Solution (Python):
a, b, k = map(int, input().split())
tail = 0
for i in range(a, a+k):
	if i <= b:
		print(i)
		tail = i
for i in range(b-k+1, b+1):
	if i > tail:
		print(i)

Solution (Python):

a, b, c = map(int, input().split())

if b - a + 1 > 2 * c:
    for i in range(a, a+c):
        print(i)
    for i in range(b-c+1, b+1):
        print(i)
else:
    for i in range(a, b+1):
        print(i)

Solution (Python):
A,B,K = map(int,input().split())




if 2 * K >= B - A + 1:
    for j in range(A,B+1):
        print(j)

    exit()




for a in range(A,A+K):
    print(a)
for b in range(B-K+1,B+1):
    print(b)

Solution (Python):
import math

a, b, k = map(int, input().split())

if math.ceil((b - a - 1) / 2) + 1 >= k + 1:
    for i in range(a, a + k):
        print(i)
    for i in range(b - k + 1, b + 1):
        print(i)
else:
    for i in range(a, b + 1):
        print(i)

Solution (Python):
def read_line(*types): return [f(a) for a, f in zip(input().split(), types)]

a, b, k = read_line(int, int, int)

if a + k > b - k:
    for i in range(a, b + 1):
        print(i)
else:
    for i in range(a, a + k):
        print(i)
    for i in range(b - k + 1, b + 1):
        print(i)

Solution (Python):
a,b,k = map(int,input().split())

n=b-a+1

if (k-1>=n-k):
    for i in range(a,b+1): print(i)

else:
    for i in range(a,a+k): print(i)
    for i in range(b-k+1,b+1): print(i)

Solution (Python):
A,B,K = map(int,input().split())
if(B-A > 1000):
    for i in range(A,A+K):
        print(i)
    for i in range(B+1-K,B+1):
        print(i)
else:
    for i in range(A,B+1):
        if(i < A+K or i > B-K):
            print(i)

Solution (Python):





if __name__ == '__main__':
    a, b, k = list(map(int, input().split()))

    if (b - a + 1) <= 2 * k:
        for i in range(a, b + 1):
            print(i)
    else:
        for j in range(a, a + k):
            print(j)
        for j in range(b - k + 1, b + 1):
            print(j)

Solution (Python):
A,B,K=map(int,input().split())

temp=[]
for i in range(K):
    if A+i<B+1: temp.append(A+i)

for i in range(K-1,-1,-1):
    if B-i>A-1: temp.append(B-i)

ans=set(temp)
ans=sorted(ans)

for i in ans:
    print(i)

Solution (Python):
a, b, k= map(int, input().split())
for x in range(a,min(a+k,b+1)):
    print(x)
for x in range(b-k+1,b+1):
    if x < a+k:
        continue
    else:
        print(x)

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

a,b,k = na()
if (b-a+1) // 2 >= k:
    ans = list(range(a,a+k)) + list(range(b-k+1,b+1))
else:
    ans = list(range(a,b+1))
for i in ans:
    print(i)

Solution (Python):
a, b, k = map(int, input().split())

nums = set()
for i in range(k):
    
    nums.add(a)
    a += 1
    if a > b:
        break
for j in range(k):
    
    nums.add(b)
    b -= 1
    if a > b:
        break

nums = sorted(nums)
for k in nums:
    print(k)

Solution (Python):
a,b,k = map(int, raw_input().split())
li = [i for i in xrange(a,b+1)] if (b-a+1)/2 < float(k) else [i for i in xrange(a,a+k)]+[i for i in xrange(b-k+1,b+1)]
for i in sorted(list(set(li))):
    print i

Solution (Python):

import numpy as np
inputs = input().split()
A = int(inputs[0])
B = int(inputs[1])
K = int(inputs[2])


if A + K < B - K:
    candidates = np.concatenate([np.arange(A, A + K), np.arange(B - K + 1, B + 1)])
else:
    candidates = np.arange(A, B + 1)
    candidates = candidates[np.logical_or(candidates < A + K, candidates > B - K)]

for s in candidates:
    print(s)

Solution (Python):
A,B,K=map(int,input().split())
if B-A+1<=K:
    for k in range(B-A+1):
        print(A+k)
elif B-A+1>K :
    for i in range(K):
        print(A+i)
if K<B-A+1 and B-A+1<K*2:
    a=B-A+1
    b=K*2-a
    for i in range(K-b):
        print(B-(K-b)+1+i)
elif B-A+1>=K*2 :
    for j in range(K):
        print(B-K+j+1)

Solution (Python):
a, b, k = map(int, input().split())
for i in range(a, min(b + 1, a + k)):
    print(i)
for i in range(max(a + k, b - k + 1), b + 1):
    print(i)

Solution (Python):
s = input().split()
a = int(s[0])
b = int(s[1])
k = int(s[2])

def sol(a,b,k):
    if b-a+1 <= 2*k:
        for i in range(a,b+1):
            print(i)
        return True
    for i in range(a,a+k):
        print(i)
    for i in range(b-k+1,b+1):
        print(i)
    return (True)

dummy = sol(a, b, k)

Solution (Python):
a, b, k = map(int, input().split())
for i in range(a, min(b + 1, a + k)):
    print(i)
for i in range(max(a + k, b - k + 1), b + 1):
    print(i)

Solution (Python):
a ,b, k = map(int,input().split())
ans = []
if (b - a) // 2 < k:
    for i in range(a , b + 1):
        print(i)
else:
    for i in range(k):
        ans.append(a + i)
    for i in range(k):
        i = k - i -1
        ans.append(b - i)
    ans = sorted(set(ans))
    for i in ans:
        print(i)

Solution (Python):
a, b, k = map(int, input().split())
i, x = 0, 0

while a+i <= b and i < k:
    x = a + i
    print(x)
    i += 1

i = k - 1
while b-i <= b:
    y = b - i
    if y <= x:
        i -= 1
        continue
    print(y)
    i -= 1

Solution (Python):
S = input()
A,B,K = map(int,S.split())

if ((B+1-A)/2 >= K):
	for iA in range(A,A+K):
		print(iA)
	for iB in range((B-K+1),B+1):
  		print(iB)
       	
else:
  	for i in range(A,B+1):
	  	print(i)

Solution (Python):
a, b, k = map(int, input().split())
s = set()
l = range(a, b+1)

if len(l) <= k:
    for i in l:
        print(i)
else:
    for j in l[:k]:
        s.add(j)
    
    for j in l[len(l)-k:]:
        s.add(j)

    m = sorted(list(s))
    for i in m:
        print(i)

Solution (Python):
A,B,K = map(int,input().split())
answer = []
for i in range(A,A+K):
    if i > B: break
    answer.append(i)
for i in range(B,B-K,-1):
    if i < A: break
    answer.append(i)

answer = list(set(answer))
answer.sort()
for i in range(len(answer)):
    print(str(answer[i]))

Solution (Python):
A, B, K = list(map(int, input().split()))

if abs(A-B)<K:
    for i in range(A, B+1):
        print(i)
else:
    x = {i for i in range(A, A+K)}
    y = {j for j in range(B-K+1, B+1)}
    z = x | y
    z = sorted(list(z))
    for a in z:
        print(a)

Solution (Python):
A, B, K = map(int, input().split())

list_num = []
a_max = -1
for i in range(K):
    if A+i <= B:
        a_max = A+i
        print(a_max)

tmp = K
for i in range(K):
    if B - tmp + 1 > a_max:
        print(B - tmp + 1)
    tmp -= 1

Solution (Python):
def small_and_large_integers(A,B,K):
    if B-A+1 <= 2*K:
        for i in range(A, B+1):
            print(i)
    else:
        for i in range(K):
            print(A+i)
        for i in range(K):
            print(B-K+1+i)

def main():
    i = input()
    A,B,K = i.split()
    A,B,K = int(A), int(B), int(K)
    small_and_large_integers(A,B,K)

if __name__ == '__main__':
    main()

Solution (Python):



def from_down(base, number, upper):
    return_list = []
    range_upper = min(upper+1, base+number)
    for i in range(base, range_upper):
        return_list.append(i)
    return return_list


def from_up(base, number, down):
    return_list = []
    range_down = max(base-number+1, down)
    for i in range(range_down, base+1):
        return_list.append(i)
    return return_list


def remove_double(object_list):
    list_unique = []
    for x in object_list:
        if x not in list_unique:
            list_unique.append(x)
    return list_unique


if __name__ == '__main__':
    A, B, K = map(int, input().split())
    down_list = from_down(A, K, B)
    upper_list = from_up(B, K, A)
    down_list.extend(upper_list)
    unique_list = remove_double(down_list)
    output = [print(element) for element in unique_list]