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):
a,b,k = map(int,input().split())
l = []
for i in range(a,a + k):
	if a <= i <= b:l.append(i)
for i in range(b,b - k,-1):
	if a <= i <= b:l.append(i)
l = sorted(set(l))
for i in l:print(i)

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

Solution (Python):
A, B, K = map(int, input().rstrip().split())
N = abs(A-B) + 1
if N//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())
c = [a+i for i in range(k) if a+i <= b] + [b-j for j in range(k) if b-j >= a]
for i in sorted(set(c)):
    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(B - K + 1, A + K), B + 1):
    print(i)

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

Solution (Python):
import sys
input = sys.stdin.readline

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

pre_arr = [i for i in range(a, min(a+k, b+1))]
back_arr = [i for i in range(max(b-k+1, a), b+1)]
arr_slice = set(pre_arr) | set(back_arr)
[print(i) for i in sorted(arr_slice)]

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

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

for i in range(k):
    numlist.append(a+i)
    numlist.append(b-i)
numlist=sorted(list(set(numlist)))
for item in numlist:
    print(item)

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

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

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

Solution (Python):
a,b,k = map(int,input().split())
if b-a+1 >= k:
    hidari = [i for i in range(a,a+k)]
    migi = [j for j in range(b,b-k,-1)]
    for i in migi:
        if i not in hidari:
            hidari.append(i)
    hidari.sort()
    for k in hidari:
        print(k)
else:
    for h in range(a,b+1):
        print(h)

Solution (Python):

import bisect





def main():
    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)
    







if __name__ == '__main__':
    main()

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

heads = list(range(A, min(A+K, B+1)))
tails = list(range(max(B-K+1, A), B+1))
print(*sorted(list(set(heads + tails))), sep='\n')

Solution (Python):
a,b,k = map(int,input().split())
if k*2 >= 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())
l=[i for i in range(a,min(b+1,a+k))] + [i for i in range(max(a,b-k+1),b+1)]
for i in sorted(set(l)):
	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 j in range(b-k+1, b+1):
        print(j)

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 = [int(i) for i in input().split()]
if k <= (b-a)//2:
  for i in range(k):
    print(a+i)
  for i in range(k-1,-1,-1):
    print(b-i)
else:
  for i in range(b-a+1):
    print(a+i)

Solution (Python):
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    a,b,k = f()
    s = set()
    for i in range(a, min(a+k, b)):
        s.add(i)
    

    for i in range(max(a,b+1-k), b+1):
        s.add(i)
    
    s = sorted(list(s))
    for i in s:
        print(i)

solve()

Solution (Python):
import sys
import math

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

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

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

Solution (Python):
def main():
  A, B, K = [int(x) for x in 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)


if __name__ == "__main__":
  main()

Solution (Python):
a,b,k=map(int,input().split())
if b-a+1<2*k:
  l=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())
ab_min=[]
ab_max=[]
for i in range(a,min(b+1,a+k)):
    ab_min.append(i)
for j in range(max(a,b+1-k),b+1):
    ab_max.append(j)

ans=list(set(ab_min)|set(ab_max))
ans.sort()

for k in range(len(ans)):
    print(ans[k])

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

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

Solution (Python):


def read_input():
    a, b, k = map(int, input().split())
    return a, b, k


def submit():
    a, b, k = read_input()

    small_max = a + k - 1
    large_min = b - k + 1

    smalls = list(range(a, small_max + 1))
    larges = list(range(large_min, b + 1))

    result = smalls + larges
    result = list(set(result))
    result.sort()
    for r in result:
        if a <= r <= b:
            print(r)

if __name__ == '__main__':
    submit()

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

if K >= B:
  print(*sorted(range(A,B+1)), sep = "\n")

else:
  a = [i for i in range(A,min(B+1,A+K))]
  b = [i for i in range(B,max(A-1,B-K),-1)]
  print(*sorted(set(a+b)), sep = "\n")

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

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

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

Solution (Python):
a, b, k = map(int, input().split())
nums = set()
for i in range(k):
    if i > (b - a):
        break

    nums.add(a + i)
    nums.add(b - i)

for x in sorted(list(nums)):
    print(x)

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

Solution (Python):
import sys
from collections import Counter

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

for i in range(a, a+k):
    if i > b:
        break
    ans_set.add(i)

for i in range(b, b-k, -1):
    if i in ans_set or b-k < 0:
        break
    ans_set.add(i)

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

Solution (Python):
A, B, K = map(int, input().split())
L = [A+i for i in range(K) if A+i <= B]
R = [B-i for i in range(K) if B-i >= A]
S = set(L+R)
S = sorted(S)
for v in S:
    print(v)

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

Solution (Python):
[A,B,K] = list(map(int,input().split()))
L = [A+i for i in range(K) if A+i <= B]
R = [B-i for i in range(K) if B-i >= A]
S = set(L+R)
S = sorted(S)
for v in S:
    print(v)

Solution (Python):
a,b,k = map(int,input().split())
li = []
x = 0
while a + x <= b and b - x >= a and x <= k-1 :
    li.append(a+x)
    li.append(b-x)
    x += 1
se = set(li)
li = list(se)
li.sort()
for i in li :
    print(i)

Solution (Python):
def main():
	A, B, K = map(int,input().split())
	head = min(A+K-1, B)
	tail = max(B-K, A)
	if tail < head:
		tail = head

	for i in range(A, head+1):
		print(i)

	for i in range(tail+1, B+1):
		print(i)


if __name__ == '__main__':
	main()

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


if k*2 < 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(a,b+1):
        print(i)

Solution (Python):

A,B,K = map(int, input().split())
ans = []
if B-A + 1 > K*2:
    for i in range(K):
        ans.append(A+i)
        ans.append(B-i)
    ans.sort()
    for j in ans: 
         print(j)
else:
    for l in range(B-A+1):
        print(A + l)

Solution (Python):

A,B,K = map(int, input().split())
ans = []
if abs(A-B) > K:
    for i in range(K):
        ans.append(A+i)
        ans.append(B-i)
    ans = set(ans)
    ans = sorted(ans)
    for j in ans: 
         print(j)
else:
    for l in range(abs(A-B)+1):
        print(min(A,B) + l)

Solution (Python):
A,B,K = map(int, input().split())
list1 = []
list2 = []
for i in range(K):
    if A+i>B:
        break
    list1.append(A+i)
    list2.append(B-i)
ans_list = sorted(list(set(list1+list2)))
for i in range(len(ans_list)):
    print(ans_list[i])

Solution (Python):

a, b, k = list(map(int, input().rstrip().split()))
ans = []

if k >= b - a:
    for i in range(a, b + 1):
        print(i)
else:
    for i in range(k):
        ans.append(a + i)
    for j in range(k):
        if b - j not in ans:
            ans.append(b - j)
    ans = sorted(ans)
    for k in ans:
        print(k)

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

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

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

ans = {i for i in range(a,min(a+k,b+1))}
ans2 = {i for i in range(b,max(b-k,a-1),-1)}

ans = ans | ans2
ans = sorted(list(ans))

for an in ans: print(an)

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

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

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

if B-A < 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+1-K,B+1):
        print(i)

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

if (A + K) - (B - K) > 0:
    for i in range(A, B + 1):
        print(i)
else:
    for k in range(A, K + A):
        print(k)
    for k in range(B - K + 1, B + 1):
        print(k)

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

m = [A+i for i in range(K) if A+i <= B]
M = [B-i for i in range(K) if B-i >= A]
out = sorted(list(set(m+M)))
for ans in out:
    print(ans)

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

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

ans = []
for i in range(K):
    ans.append(A+i)
    ans.append(B-i)
ans = [a for a in ans if A <= a <= B]
ans = list(set(ans))
ans.sort()
for i in ans:
    print(i)

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

for i in range(K):
    C.add(A+i)
    C.add(B-i)

C = list(C)
C.sort()

for i in range(len(C)):
    if A <= C[i] <= B:
        print(C[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+1-K, A+K), 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())

answer = set()

answer |= set(range(a, min(a+k, b+1)))
answer |= set(range(b, max(b-k, a-1), -1))

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

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

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

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

ans = []
for i in range(k):
    if a+i > b:
        break
    ans.append(a+i)
for i in range(k):
    if b-i < a:
        break
    ans.append(b-i)

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

Solution (Python):
A, B, K = map(int, input().split())
L = range(A, B + 1)
print(*sorted(set(L[:K]) | set(L[-K:])), sep="\n")

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

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

Solution (Python):
import sys

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

if K > B-A:
    for i in range(A, B+1):
        print(i)
    sys.exit()

ans = set()
for i in range(A, A+K):
    ans.add(i)
for i in range(B-K+1, B+1):
    ans.add(i)
    
ans = list(ans)
ans.sort()

for i in ans:
    print(i)

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

Solution (Python):
A,B,K = [int(x) for x in 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):
    if(i<= A+K-1 or i>= B-K+1):
      print(i)

Solution (Python):
a, b, k = map(int, input().split())
ans = []
for i in range(k):
  ans.append(a + i)
  ans.append(b - i)

for j in sorted(set(ans)):
  if a <= j <= b:
    print(j)

Solution (Python):

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

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

abk = list(set(ak) | set(bk))
abk.sort()

for i in abk:
    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):
def MI(): return map(int, input().split())
def II(): return int(input())
def IS(): return input()
def LI(): return list(map(int, input().split()))

a, b, k = MI()
small = [i for i in range(a, a+k, 1)]
large = [i for i in range(b-k+1, b+1, 1)]
for i in (sorted(list(set(small+large)))):
    if a <= i <= b: print(i)

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

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

l=range(A, min(B+1, A+K))
r=range(max(A, B+1-K), B+1)

print("\n".join(map(str, sorted(set(l)|set(r)))))

Solution (Python):
A, B, K = map(int, input().split())
for i in range(A, min(B, A+K-1)+1):
    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())
L = []

for i in range(K):
    if A + i > B - i:
        break
    else:
        L.append(A + i)
        L.append(B - i)

L = set(L)
L = sorted(L)

for l in L:
    print(l)

Solution (Python):
a,b,k=map(int,input().split())
s=set()
if k>(b-a):
  for i in range(a,b+1):
    print(i)
else:
  for i in range(min(k,b-a)):
    s.add(a+i)
    s.add(b-i)
  arr=list(s)
  arr=sorted(arr)
  for i in arr:
    print(i)

Solution (Python):
a,b,k=map(int,input().split())
N=[int(i) for i in range(a,min(a+k,b+1))]
M=[int(i) for i in range(max(a,b-k+1),b+1)]
print(*sorted(set(M+N)),sep="\n")

Solution (Python):
A,B,K=map(int,input().split())
if B-A < K :
  for i in range(A,B+1) :
    if i < A+K or B-K < i :
      print(i)
else :
  S=set()
  for i in range(K) :
    S.add(A+i)
    S.add(B-i)
  L=list(S)
  L.sort() 
  for i in L :
    print(i)

Solution (Python):

A,B,K= 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-i >=A:
        
        ans.append(B-i)
ans =list(set(ans))
ans.sort()
for i in ans:
    print(i)

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

Solution (Python):



import math


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):
lists = input().split()
a = int(lists[0])
b = int(lists[1])
x = int(lists[2]) * 2
answer  = []
next = 0
for num in range(0, x):
    if(a == b):
        answer.append(a)
        break
    answer.append(a)
    answer.append(b)
    a += 1
    b -= 1
    if(len(answer) >= x or a > b or b < 0):
        break
    if(a == b):
        answer.append(a)
        if(a + num < b - num):
            for b_num in range(b, a):
                answer.append(b_num)
                if (len(answer) > x):
                    break
        elif(a + num > b - num):
            for a_num in range(a, b):
                answer.append(a_num)
                if (len(answer) > x):
                    break
        break
answer.sort()
for a in answer:
    print(a)

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())
mitasu_seisu = []
for i in range(A, min(A + K, B)):
    mitasu_seisu.append(i)
for j in range(max(A, B - K + 1), B + 1):
    mitasu_seisu.append(j)
for k in sorted(set(mitasu_seisu)):
    print(k)

Solution (Python):
a,b,k = map(int,input().split())
res = []
for i in range(a,min(a+k,b)):
    res.append(i)
for j in range(max(a,b-k+1),b+1):
    res.append(j)
res = sorted(set(res))
for i in res:
    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())
ans = []


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


for i in range(K):
    if A <= B-(K-1)+i <= B and B-(K-1)+i not in ans:
        ans.append(B-(K-1)+i)
for a in ans:
    print(a)

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 = set()
for i in range(min(b-a+1,k)):
    ans.add(a+i)
for i in range(min(b-a+1,k)):
    ans.add(b-i)

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

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

L = []

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

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

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

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

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

Solution (Python):
import sys

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

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

l = [i for i in range(A, A + K) if i <= B]
li = l + [i for i in range(B - K + 1, B + 1) if i >= A]

for i in sorted(set(li)):
    print(i)

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

res = []

for a in range(A,min(A + K,B)):
    res.append(a)
for b in range(max(A,B - K + 1),B + 1):
    res.append(b)

for r in sorted(list(set(res))):
    print(r)

Solution (Python):
import sys

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

if b - a + 1 >= 2 * k:
    for i in range(0, 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())
l=[]
if 2*K>=B-A+1:
    for i in range(A,B+1):
        print(i)
else:
    for i in range(K):
        print(i+A)
    for i in range(K):
        print(B-K+1+i)

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

ans = []

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

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

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

l1 = [x for x in range(A, min(A + K, B + 1))]
l2 = [x for x in range(max(B - K + 1, A),B + 1)]
ans = sorted(list(set(l1 + l2)))
for i in range(len(ans)):
    print(ans[i])

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

small = set(i for i in range(a,a+k) if i<=b)
big = set(i for i in range(b-k+1,b+1) if i>=a)

ans = small | big
for item in sorted(ans):
  print(item)

Solution (Python):
A, B, K = map(int, input().split())
g = range(A, B+1)
s = set(g[:K]) | set(g[len(g)-K:])
[print(n) for n in sorted(list(s))]

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

li = [i for i in range(A, A+K) if i <= B]
li = li + [i for i in range(B-K+1,B+1) if i >= A]

for i in sorted(set(li)):
    print(i)

Solution (Python):
a,b,c=map(int,input().split())
if b-a+1>c*2:
  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())
a_ = min(a+k, b)
b_ = max(b-k+1, a)
s = list(range(a, a_)) + list(range(b_, b+1))
s = set(s)
s = list(s)
s.sort()
for s_ in s:
    print(s_)

Solution (Python):
import math
a,b,k = map(int, input().split())
res = []
if 2*k > b-a:
    k = math.ceil((b-a)/2)+1
for i in range(k):
    res.append(a+i)
    res.append(b-i)

for s in sorted(set(res)):
    print(s)

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

for i in range(K):
    if A+i <= B :
       l.add(A+i)
    else:
       continue
for j in range(K):
    if B-j >= A:
       l.add(B-j)
    else:
       continue
list = list(l)
list.sort()
for i in range(len(list)):
    print(list[i])

Solution (Python):


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

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

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

l = set(lists)
m = list(l)

m.sort()

for i in m:
    print(i)

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

Solution (Python):
a,b,k=map(int,input().split())
m=[]
for i in range(a,min(a+k,b+1)):
    m.append(i)
for i in range(max(b-k+1,a),b+1):
    m.append(i)
l=set(m)
ll=list(l)
lll=sorted(ll)
for i in range(len(lll)):
    print(lll[i])

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

Solution (Python):
def print_all(a, b):
    for i in range(a - 1, b):
        print(i + 1)


a, b, k = map(int, input().split())
elem = b - a + 1

if elem <= 2 * k:
    print_all(a, b)

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

Solution (Python):


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

Solution (Python):

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

Solution (Python):
from sys import stdin
a,b,k = [int(_) for _ in stdin.readline().rstrip().split()]
for i in range(a, min(b,a+k-1)+1):
    print(i)
for i in range(max(a+k,b-k+1), b+1):
    print(i)

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

t1 = min(B, A + K - 1)
t2 = max(A + K, B - K + 1)
ans = []
for i in range(A, t1 + 1):
    ans.append(i)
for i in range(t2, B + 1):
    ans.append(i)

print("\n".join(map(str, ans)))

Solution (Python):
def solve(string):
    a, b, k = map(int, string.split())
    l = set(range(a, min(a + k, b)))
    r = set(range(max(a, b - k + 1), b + 1))
    return "\n".join(map(str, sorted(l | r)))


if __name__ == '__main__':
    print(solve(input()))

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

if a+k<b-k+1:
    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)

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

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

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

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

ans = list(range(a, a+k)) + list(range(b-k+1, b+1))
ans.sort()
ans2 = []
for i in ans:
    if a<=i<=b and i not in ans2:
        ans2.append(i)

for j in ans2:
    print(j)

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

ans = list(range(a, a+k)) + list(range(b-k+1, b+1))
ans.sort()
ans2 = []
for i in ans:
    if a<=i<=b and i not in ans2:
        ans2.append(i)

for j in ans2:
    print(j)

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

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007
sys.setrecursionlimit(1000000)


def A():
    s = S()
    a = s.count("a")
    b = s.count("b")
    c = 3-a-b
    if a&b&c:
        print("Yes")
    else:
        print("No")

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(a,b-k+1),b+1):
        ans.append(i)
    ans = list(set(ans))
    ans.sort()
    for i in ans:
        print(i)


def C():
    a,b,c = LI()
    ans = 0
    if a%2:
        if b%2:
            if not c%2:
                ans += 1
                a += 1
                b += 1
        else:
            ans += 1
            if not c%2:
                b += 1
                c += 1
            else:
                a += 1
                c += 1
    else:
        if b%2:
            ans += 1
            if not c%2:
                a += 1
                c += 1
            else:
                b += 1
                c += 1
        else:
            if c%2:
                ans += 1
                a += 1
                b += 1
    ans += (3*max(a,b,c)-a-b-c)//2
    print(ans)

def D():
    q = I()
    for i in range(q):
        a,b = LI()
        x = int((a*b)**0.5)
        y = math.ceil((a*b)/x)-1
        ans = x+y-2
        if a==b:
            ans += 1
        print(ans)


def E():
    s = S()
    f = {"N":0,"W":0,"S":0,"E":0}
    for i in s:
        f[i] = 1
    if f["N"]^f["S"]:
        print("No")
    elif f["W"]^f["E"]:
        print("No")
    else:
        print("Yes")

def F():
    return


def G():
    return


def H():
    return


if __name__ == "__main__":
    B()