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 sys




def main():
	a, b, k = map(int, input().split())
	if a+k < b+1-k:
		
		ff=range(a,b+1)[:k]
		bb=range(a,b+1)[-k:]
		ret=list(ff)+list(bb)
	else:
		ret=range(a,b+1)
	
	for i in ret:
		print(i)
		


if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
	else:
		input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    s = S()
    s.sort()
    if s == ["a", "b", "c"]:
        print("Yes")
    else:
        print("No")
    return


def B():
    a, b, k = LI()
    ans = []
    for i in range(a, min(a + k, b + 1)):
        ans.append(i)
    for i in range(max(b - k + 1, a + k), b + 1):
        ans.append(i)
    for i in ans:
        print(i)
    return


def C():
    return


def D():
    return


if __name__ == '__main__':
    B()

Solution (Python):
a, b, c = map(int, input().split())
d = {}
for i in range(a, a+c):
    d[i] = 1
    if i == b:
        break
for i in range(b, b-c, -1):
    d[i] = 1
    if i == a:
        break
d = sorted(d.items())
for i, j in d:
    print(i)

Solution (Python):
a, b, k = map(int, input().split())
if a + k <= b - k:
    l = [x for x in range(a, min(b, a + k))]
    r = [x for x in range(b, max(a, b - k), -1)]
    r = r[::-1]
    lr = l + r
else:
    lr = [x for x in range(a, b + 1)]
for x in lr:
    print(x)

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

if (abs(a-b) + 1) / 2 <= k:
  for i in range(a, b+1):
    print(i)
  exit()

for i in range(k):
  print(a+i)

for i in sorted([b - i for i in range(k)]):
  print(i)

Solution (Python):
a,b,k=map(int,input().split())
print(*sorted(set(range(a,min(b+1,a+k)))|set(range(max(b-k+1,a),b+1))),sep='\n')

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





smallK.extend(largeK)


set1=list(set(smallK))

set1.sort()

for i in set1:
  print(i)

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

Solution (Python):



A, B, K = map(int, input().split())
a1 = [_ for _ in range(A, min(A + K, B + 1))]
a2 = [_ for _ in range(max(A, B - K + 1), B + 1)]
s = sorted(set(a1 + a2))

for i in s: print(i)

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

if a+k<b+1:
  e = a+k
else:
  e = b+1
for i in range(a,e):
  tmp.append(i)

if a<b-k+1:
  f = b-k+1
else:
  f = a
for i in range(f,b+1):
  tmp.append(i)

ans = sorted(set(tmp))
for i in ans:
  print(i)

Solution (Python):
A,B,K = map(int,input().split())
if 2*K<B-A+1:
    S = [i for i in range(A,A+K)]+[i for i in range(B-K+1,B+1)]
else:
    S = [i for i in range(A,B+1)]
for s in S:
    print(s)

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

for i in range(min(K, B - A + 1)):
    ans.add(A + i)
    ans.add(B - i)

ans = sorted(ans)
for i in ans:
    print(i)

Solution (Python):
a, b, c = map(int, input().split())
d = 0
e = {}
for i in range(a, b+1):
    if i not in e:
        e.setdefault(i, i)
    d += 1
    if d >= c:
        break
d = 0
for i in range(b, a-1, -1):
    if i not in e:
        e.setdefault(i, i)
    d += 1
    if d >= c:
        break
e = sorted(e)
for i in e:
    print(i)

Solution (Python):
from itertools import chain
a, b, k = map(int, input().split(" "))
r1 = range(a, min(b + 1, a + k))
r2 = range(max(a, b - k + 1), b + 1)
ans = sorted(set((chain(r1, r2))))
print('\n'.join(str(x) for x in ans))

Solution (Python):
A, B, K = map(int, input().split())
R = range(A, min(B + 1, A + K))
S = range(max(A, B - K + 1), B + 1)
L = list(set(R) | set(S))
L.sort()
print(*L, sep="\n")

Solution (Python):
a, b, k = map(int, input().split())
ans = []
for i in range(k):
    p = b -i
    m = a + i
    if a <= p and b >= p:
        ans.append(p)
    if a <= m and b >= m:
        ans.append(m) 
ans = sorted(list(set(ans)))   
for i in ans:
    print(i)

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

ans=list(range(a,min(a+k,b)))+list(range(max(a,b-k+1),b+1))
ans=set(ans)
ans=list(ans)
ans.sort()
for i in range(len(ans)):
    print(ans[i])

Solution (Python):

import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import numpy as np
import statistics
from statistics import mean, median,variance,stdev
import math

def main():
	A, B, K = map(int, input().split(" "))
	
	tmp = -1
	e = min(B, A+K)
	for i in range(A, e):
		print(i)
		tmp = i
	
	
	
	s = max(A, tmp+1, B-K+1)
	for i in range(s, B+1):
		print(i)
			
	
if __name__ == "__main__":
	main()

Solution (Python):
A,B,K=map(int, input().split())
if A+K-1<B-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())
anslist = []
for i in range(0, K):
	if A+i in anslist or B < A+i:
		break
	anslist.append(A+i)
	if B-i in anslist or B-i < A:
		break
	anslist.append(B-i)
anslist.sort()
for i in range(0, len(anslist)):
	print(anslist[i])

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

Solution (Python):



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

ans = []
for i in range(k):
    if a+i <= b:
        ans.append(a+i)
for i in range(k):
    if b-(k-i)+1 >= a:
        ans.append(b-(k-i)+1)
ans = list(set(ans))
ans.sort()
for i in range(len(ans)):
    print(ans[i])

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

se = set(range(a,a+k)) | set(range(b-k+1,b+1))
li = list(se)
li = [x for x in li if a<=x<=b]

li.sort()
print(*li,sep='\n')

Solution (Python):
mi, ma, num = map(int,input().split())
ans = []
if num <= ma-mi+1:
  for i in range(mi,mi+num):
    ans.append(i)
  for j in range(ma-num+1,ma+1):
    if j not in ans:
      ans.append(j)
  for k in ans:
    print(k)
else:
  for l in range(mi,ma+1):
    print(l)

Solution (Python):
A,B,K=map(int,input().split())
if A+K-1<B-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):
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):
A, B, K = map(int, input().split())

S = set()
for i in range(K):
    a = A+i
    if A <= a <= B:
        S.add(a)
    b = B-i
    if A <= b <= B:
        S.add(b)

l = list(S)
l.sort()
for s in l:
    print(s)

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:
    aa=[a+i for i in range(k)]
    bb=[b-j for j in range(k)]
    cc=sorted(aa+bb)
    for c in cc:
        print(c)

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

Solution (Python):
a, b, k = map(int, input().split())
arr = range(a, b+1)
for i in sorted(set(arr[:k]) | set(arr[-k:])):
    print(i)

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

m  = min(A+K, B+1)
for i in range(A, m):
    print(i)
n = max(A+K, B-K+1)
for j in range(n, B+1):
    print(j)

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:
    aa=[a+i for i in range(k)]
    bb=[b-j for j in range(k)]
    cc=sorted(aa+bb)
    for s in cc:
        print(s)

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

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

if b-a+1>=2*k:
    aa=[a+i for i in range(k)]
    bb=[b-i for i in range(k)]
    cc=sorted(aa+bb)
    for s in cc:
        print(s)
else:
    for n in range(a,b+1):
        print(n)

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

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(ans):
  print(i)

Solution (Python):
import sys

def input():
    return sys.stdin.readline().rstrip()

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

    mid = (a + b) // 2

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

Solution (Python):
def resolve():
    a,b,k=map(int,input().split())
    realk=min(b-a+1,k)
    ans=list(range(a,a+realk))
    ans+=list(range(b-realk+1,b+1))
    answer=sorted(list(set(ans)))
    for i in answer:
        print(i)
    

resolve()

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):
  print(b-k+1+i)
else:
 for i in range(b-a+1):
  print(a+i)

Solution (Python):
from functools import reduce
import math

def main():
    
    
    
    

    
    
    
    
    
    

    
    

    
    
    
    
    
    
    
    
    
    INF = float("inf")

    
    MOD = 10**9+7
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    A, B, K = (int(_) for _ in input().split())
    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:
            break
        s.add(i)
    l = list(s)
    l.sort()
    print('\n'.join(str(_) for _ in l))
    
if __name__ == '__main__':
    main()

Solution (Python):
a,b,k=map(int,input().split())
if a+k-1>=b-k+1:
  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)

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

ans = set()
for i in range(a, min(b, a + k - 1) + 1):
    ans.add(i)
for i in range(max(a, b - k + 1), b + 1):
    ans.add(i)
ans = list(ans)
ans.sort()

for i in ans:
    print(i)

Solution (Python):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

A, B, K = nl()

seen = set()

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

count = 0
for i in range(B, A-1, -1):
    if count >= K:
        break
    seen.add(i)
    count += 1

for c in sorted(list(seen)):
    print(c)

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):
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(ans):
  print(i)

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

    answer = []
    for i in range(K):
        n = A + i
        if n <= B:
            answer.append(n)
        m = B - i
        if A <= m:
            answer.append(m)
    answer = sorted(list(set(answer)))

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

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

S1 = [i for i in range(A, min(A + K, B + 1))]
S2 = [i for i in range(max(A, B - K + 1),B + 1)]
S = list(set(S1 + S2))
S.sort()

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

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

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

Solution (Python):
a,b,k = map(int, input().split())
n = a
c = 1
while n <= b:
    print(n)
    n += 1
    c += 1
    if c > k:
        break
if n <= (b - k):
    n = b - k + 1

c = 1
while n <= b:
    print(n)
    n += 1
    c += 1
    if c > k:
        break

Solution (Python):
def abc():
    a, b, c = map(int, input().split())
    n = range(a, b + 1)
    for s in sorted(set(n[:c]) | set(n[-c:])):
        print(s)


abc()

Solution (Python):
A, B, K = [int(ngzk) for ngzk in input().split()]
AB = B - A + 1
if AB <= 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())
 
X = list(range(A, min(A+K, B+1)))
Y = list(range(max(A+K, B-K+1), B+1))
for v in X + Y:
    print(v)

Solution (Python):



A,B,K = list(map(int,input().split(" ")))
ans = []
for i in range(K):
    if A<=A+i<=B:
        ans.append(A+i)
    if A<=B-i<=B:
        ans.append(B-i)
ans = list(set(ans))
ans.sort()
for i in ans:
    print(i)

Solution (Python):

import time
import re
import math

def main():
    A,B,K = map(int,input().split())
    ls=[]
    for a in range(K):
        ls.append(A + a)
        ls.append(B - K +1+ a)
    ls=set(ls)
    ls=sorted(ls)
    for a in ls:
        if (a>=A and a<=B):print(a)
main()

Solution (Python):
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")






A, B, K = list(map(int, sys.stdin.readline().split()))

a = list(range(A, min(B, A + K)))
b = list(range(max(A, B - K + 1), B + 1))



print('\n'.join(map(str, list(sorted(set(a + b))))))

Solution (Python):
a,b,k = map(int,input().split())
lia = list(range(a,a+k))
lib = list(range(b-k+1,b+1))
if a+k > b:
  setans = set(lia + lib)&set(range(a,b+1))
else:
  setans = set(lia + lib)
for i in sorted(setans):
  print(i)

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

se = set(range(a,a+k)) | set(range(b-k+1,b+1))
li = list(se)
li = [x for x in li if a<=x<=b]

li.sort()
print(*li,sep='\n')

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

num = []

for i in range(K):
    if A+i <+ B:
        num.append(A+i)
    if B-i >= A:
        num.append(B-i)

ans = sorted(set(num))

for s in ans:
    print(s)

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())
aa=a
l=[]
while a<(min(aa+k,b+1)):
  l.append(a)
  a+=1  
for i in range(max(b-k+1,a),b+1):
  l.append(i)
x=list(set(l))
x.sort()
for i in range(len(x)):
  print(x[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, input().split())
ans = []
if b-a < 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())

if b-a < 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())
if B - A - K*2 < 0:
    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())

li1 = [i for i in range(a,a+k) if i <= b]
li2 = [i for i in range(b+1-k,b+1) if i >= a]

li1.extend(li2)
li1 = set(li1)

for i in sorted(li1):
    print(i)

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

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

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

Solution (Python):
a,b,k=map(int,input().split())
if 2*k>=b-a+1:
  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 > 2 * K:
  [print(i) for i in range(A,A+K)]
  [print(i) for i in range(B+1-K,B+1)]
else:
  [print(i) for i in range(A,B+1) if i - K < A or i + K > B]

Solution (Python):
a,b,k=map(int,input().split())
A=[]
if k>=b-a:
  for i in range(b-a+1):
    print(a+i)
else:
  for i in range(k):
    A.append(a+i)
    if a+i!=b-i:
      A.append(b-i)
  for i in range(len(A)):
    print(sorted(A)[i])

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

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

for i in sorted(set(x[:k]) | set(x[-k:])):
    print(i)

Solution (Python):
a, b, k = map(int, input().split())
length = b+1 -a
num = []

for i in range(a, min(b, a+k-1)+1):
    print(i)
    num.append(i)
for i in range(max(a, b - (k-1)), b+1):
    if i not in num:
        num.append(i)
        print(i)

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

r=range(a,b+1)
for i in sorted(set(r[:k])|set(r[-k:])):print(i)

Solution (Python):
a,b,k = map(int,input().split())
if b-a <= 2 * k - 1:
    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+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 = b - a + 1
if L <= 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 = [int(x) for x in input().split()]

u = set(range(A, min(B+1, A+K)))
l = set(range(B, max(A-1, B-K),-1))
for i in sorted(u | l):
    print(i)

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

Solution (Python):
a, b, k = [ int(v) for v in input().split() ]

a_list =  [ i for i in range(a,min(a+k,b+1)) ]
b_list =  [ i for i in range(max(a,b+1-k),b+1) ]

ans_list = sorted(list(set(a_list+b_list)))
ans_list = [ str(v) for v in ans_list ]
print(" ".join(ans_list))

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())

result = set()

for i in range(a,min(a+k,b+1)):
    result.add(i)
for j in range(max(a,b-k+1),b+1):
    result.add(j)

for k in sorted(list(result)):
    print(k)

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

result = set()

for n in range(A, min(A + K, B + 1)):
    result.add(n)

for n in range(max(A, B - K + 1), B + 1):
    result.add(n)

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

Solution (Python):

import sys


def solve(A: int, B: int, K: int):
    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)




def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    K = int(next(tokens))  
    solve(A, B, K)

if __name__ == '__main__':
    main()

Solution (Python):
A,B,K=map(int,input().split())
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 k in range(A,B+1):
        print(k)

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

Solution (Python):
A, B, K = map(int, raw_input().split())
numberlst = []
for i in range(0, K):
	if A+i > B: break
	numberlst.append(A+i)
for i in range(0, K):
	if A > B-i or B-i in numberlst: break
	numberlst.append(B-i)
numberlst.sort()
for i in range(0, len(numberlst)):
	print numberlst[i]

Solution (Python):
a,b,k = (int(x) for x in 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())
x=[]
for i in range(k):
    if a<=a+i<=b:
        x.append(a+i)
        x.append(b-i)
x = sorted(list(set(x)))
for i in x:
    print(i)

Solution (Python):
a,b,k=map(int,input().split())
j=min(b-a+1,k)
s=set()
for i in range(j):
    s.add(a+i)
    s.add(b-i)
List=sorted(list(s))
for i in range(len(List)):
    print(List[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(b-k+1, a+k), b+1):
    print(i)

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

lst = []
for i in range(K):
    lst += [A + i]
for i in range(K):
    lst += [B - i]

lst.sort()
a = 0
for i in lst:
    if A <= i and i <= B:
        if a == i:
            pass
        else:
            a = i
            print (a)

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

if A+K-1 >= B-K+1:
    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=[]
for i in range(k):
    if a+i not in l and a+i<=b:
        l.append(a+i)
for i in range(k):
    if b-k+1+i not in l and b-k+1+i>=a:
        l.append(b-k+1+i)
m=sorted(l)
for i in range(len(m)):
    print(m[i])

Solution (Python):
A,B,K = map(int,input().split())
if 2*K >= B-A+1:
    for i in range(A,B+1):
        print(i)
else:
    for j in range(A,A+K):
        print(j)
    for v in range(B-K+1,B+1):
        print(v)

Solution (Python):

import sys


def solve(A: int, B: int, K: int):
    s = set()
    for i in range(A, min(A + K, B + 1)):
        s.add(i)
    for i in range(max(B - K + 1, A + K - 1), B + 1):
        s.add(i)
    ret = sorted(list(s))
    for n in ret:
        print(n)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    K = int(next(tokens))  
    solve(A, B, K)

if __name__ == '__main__':
    main()

Solution (Python):
A,B,K = map(int,input().split())
if 2*K >= B-A+1:
    for i in range(A,B+1):
        print(i)
else:
    for j in range(A,A+K):
        print(j)
    for v in range(B-K+1,B+1):
        print(v)

Solution (Python):
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 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())
num = []
for _ in range(A, A + K):
    if _ <= B:
        num.append(_)
for _ in range(B - K + 1, B + 1):
    if A <= _:
        num.append(_)
num = sorted(list(set(num)))
for n in num:
    print(n)

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())
if a+k >= b-k:
    for i in range(a, b+1):
        if i < a+k or b-i+1 <= k:
            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())
cnt = b - a + 1

vals = list()
if cnt < k:
    wk = cnt
else:
    wk = k


for i in range(a, a + wk):
    print(i)

if k * 2 > cnt:
    wk = cnt - wk


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

Solution (Python):


from sys import stdout
from bisect import bisect_left as binl
from copy import copy, deepcopy
from collections import defaultdict


mod = 1


def intin():
    input_tuple = input().split()
    if len(input_tuple) <= 1:
        return int(input_tuple[0])
    return tuple(map(int, input_tuple))


def intina():
    return [int(i) for i in input().split()]


def intinl(count):
    return [intin() for _ in range(count)]


def modadd(x, y):
    global mod
    return (x + y) % mod


def modmlt(x, y):
    global mod
    return (x * y) % mod


def lcm(x, y):
    while y != 0:
        z = x % y
        x = y
        y = z
    return x


def combination(x, y):
    assert(x >= y)

    if y > x // 2:
        y = x - y

    ret = 1

    for i in range(0, y):
        j = x - i
        i = i + 1

        ret = ret * j
        ret = ret // i

    return ret


def get_divisors(x):
    retlist = []
    for i in range(1, int(x**0.5) + 3):
        if x % i == 0:
            retlist.append(i)
            retlist.append(x // i)
    return retlist


def get_factors(x):
    retlist = []
    for i in range(2, int(x**0.5) + 3):
        while x % i == 0:
            retlist.append(i)
            x = x // i
    retlist.append(x)
    return retlist


def make_linklist(xylist):
    linklist = {}
    for a, b in xylist:
        linklist.setdefault(a, [])
        linklist.setdefault(b, [])
        linklist[a].append(b)
        linklist[b].append(a)
    return linklist


def calc_longest_distance(linklist, v=1):
    distance_list = {}
    distance_count = 0
    distance = 0
    vlist_previous = []
    vlist = [v]
    nodecount = len(linklist)

    while distance_count < nodecount:
        vlist_next = []
        for v in vlist:
            distance_list[v] = distance
            distance_count += 1
            vlist_next.extend(linklist[v])
        distance += 1
        vlist_to_del = vlist_previous
        vlist_previous = vlist
        vlist = list(set(vlist_next) - set(vlist_to_del))

    max_distance = -1
    max_v = None
    for v, distance in distance_list.items():
        if distance > max_distance:
            max_distance = distance
            max_v = v

    return (max_distance, max_v)


def calc_tree_diameter(linklist, v=1):
    _, u = calc_longest_distance(linklist, v)
    distance, _ = calc_longest_distance(linklist, u)
    return distance


class UnionFind:

    def __init__(self, n):
        self.parent = [i for i in range(n)]

    def root(self, i):
        if self.parent[i] == i:
            return i
        self.parent[i] = self.root(self.parent[i])
        return self.parent[i]

    def unite(self, i, j):
        rooti = self.root(i)
        rootj = self.root(j)
        if rooti == rootj:
            return
        if rooti < rootj:
            self.parent[rootj] = rooti
        else:
            self.parent[rooti] = rootj

    def same(self, i, j):
        return self.root(i) == self.root(j)





def main():
    a, b, k = intin()

    ans = []

    for i in range(a, min(a + k, b + 1)):
        ans.append(i)

    for i in range(max(a, b - k + 1), b + 1):
        ans.append(i)

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


if __name__ == '__main__':
    main()

Solution (Python):
from sys import stdin
A,B,K=[int(x) for x in stdin.readline().rstrip().split()]
ran = range(A,B+1)
for i in sorted(set(ran[:K])|set(ran[-K:])):
    print(i)

Solution (Python):
A, B, K = map(int, input().split())
tmp = []
for i, n in enumerate(range(A, B+1)):
    if i >= K:
        break
    tmp.append(n)
for i, n in enumerate(range(B, A-1, -1)):
    if i >= K:
        break
    tmp.append(n)
tmp = list(set(tmp))
tmp.sort()
for i in tmp:
    print(i)

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

for i in range(A, min(B, A+K)):
  l.append(i)
for i in range(max(A, B-K+1), B+1):
  l.append(i)

l = list(set(l))
l.sort()
for i in l:
  print(i)

Solution (Python):
a,b,k = (int(i) for i in input().split())
al,bl = [a],[b]
for i in range(min(k-1,b-a)):
    al.append(al[i]+1)
for i in range(min(k-1,b-a)):
    bl.append(bl[i]-1)
al.extend(bl)
al = list(set(al))
while True:
    print(min(al))
    al.remove(min(al))
    if al == []:
        exit()

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

Solution (Python):
a, b, k = map(int, input().split())
ans = []
for i in range(a, min(a+k, b)):
    ans.append(i)
for i in range(max(a, b-k+1), b+1):
    ans.append(i)
for n in sorted(set(ans)): print(n)