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

a = set(range(A,min(A+K, B)))
b = set(range(B,max(B-K,A),-1))
a = sorted(a|b)

if A == B:
    print(A)
else:
    for i in a:
        print(i)

Solution (Python):
import sys
import os
import math
import string

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

MOD = 10 ** 9 + 7


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

    A, B, K = il()
    R = range(A, B + 1)
    for i in sorted(set(R[:K]) | set(R[-K:])):
        print(i)


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

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

li = []
for i in range(A, A+K):
    if i <= B:
        li.append(i)
for j in range(B-K+1, B+1):
    if j >= A:
        li.append(j)
li = sorted(list(set(li)))
for a in li:
    print(a)

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

ans = []
k = min(k,b-a+1)
ans += range(a, a + k )
ans += range(b, b - k , -1)

ans = list(sorted(set(ans)))
for i in range(len(ans)):
    print(ans[i])

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

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

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

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

i=A
while i<=min(B,A+K-1):
    print(i)
    i+=1

j=B-K+1
while j<=B:
    if i<=j:
        print(j)
    j+=1

Solution (Python):
icase=0
if icase==0:
    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())
ans = []
for i in range(a, a+k):
    ans += [i]*(i<=b)
for i in range(b, b-k, -1):
    ans += [i]*(a<=i)
print(*(sorted(set(ans))), sep='\n')

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

Solution (Python):
A,B,K=map(int,input().split())
li=range(A,B+1)
ans=sorted(set(li[:K])|set(li[-K:]))
for i in ans:
    print(i)

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

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

Solution (Python):

import io

n,m,k = map(int,input().split())
if 2*k >= m-n+1:
    for i in range(n,m+1):
        print(i)
else:
    for j in range(n,n+k):
        print(j)
    for p in range(m-k+1,m+1):
        print(p)

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

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

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

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

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

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

Solution (Python):
a,b,k=map(int,input().split())
l=range(a,b+1)
ans=sorted(set(l[:k])|set(l[-k:]))
for i in ans:
    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):
def myAnswer(A:int,B:int,K:int) -> int:
   if(B - A >= K):
      ans = [i for i in range(A,A+K) ]
      for i in range(B,B-K,-1):
         ans.append(i)
   else:
      ans = [i for i in range(A,B+1)]
   ans = list(set(ans))
   ans.sort()
   for a in ans:
      print(a)

   

def modelAnswer():
   tmp=1
def main():
   A,B,K = map(int,input().split())
   myAnswer(A,B,K)

if __name__ == '__main__':
   main()

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

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

l = list(ans)
l.sort()
for n in l:
    print(n)

Solution (Python):

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


ans = []

if a + k > b:
    for i in range(a, b + 1):
        ans.append(i)
else:
    for i in range(a, a + k):
        ans.append(i)
    for i in range(b - k + 1, b + 1):
        ans.append(i)
ans = list(set(ans))
ans.sort()
for a in ans:
    print(a)

Solution (Python):

a, b, k = [int(s) for s in input().split()]
nums = []

if k >= b - a + 1:
    nums = list(range(a, b + 1))
else:
    nums = list(set(list(range(a, a + k)) + list(range(b - k + 1, b + 1))))
    nums.sort()

for num in nums:
    print(num)

Solution (Python):
A, B, K = map(int, input().split())
num_list = []
for i in range(K):
    num_list.append(A + i)
for i in range(K):
    num_list.append(B - i)
num_list = sorted(set(num_list))

for i in num_list:
    if A <= i <= B:
        print(i)

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

a_s = set(list(range(a, min(b+1, a+k))))
b_s = set(list(range(max(a, b-k+1), b+1)))
s_uni = b_s | a_s
print(*sorted(s_uni), sep='\n')

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

st = set(list(range(A, A+K)) + list(range(B-K+1, B+1)))

st = sorted(list(st))
for val in st:
    if A <= val <= B:
        print(val)

Solution (Python):
import collections
import sys
import numpy as np
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
MOD = 10**9+7
import itertools
import math

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

Solution (Python):
import sys
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))

def main():
    a, b, k = MII()
    if b-a <= k:
        for i in range(a, b+1): print(i)
    else:
        n = []
        for i in range(a, a+k): n.append(i)
        for i in reversed(range(b-k+1, b+1)): n.append(i)
        n = sorted(list(set(n)))
        for i in n: print(i)


if __name__ == '__main__':
    main()

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

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

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

abset=set()
for i in range(K):
  abset.add(A+i)
  abset.add(B-i)
  
ablist=[]
for x in abset:
  if A<=x and x<=B:
    ablist.append(x)
ablist.sort()

for ab in ablist:
  print(ab)

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

ans = []
for i in range(K):
    ans.append(A + i)

for i in range(K):
    ans.append(B - i)

ans = sorted(list(set(ans)))
for x in ans:
    if (A <= x and x <= B):
        print(x)

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

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

Solution (Python):
A,B,K = map(int,open(0).read().split()) 

a = [min(i,B) for i in range(A,A+K)]
b = [max(i,A) for i in range(B,B-K,-1)]
s = sorted(set(a) | set(b))
for i in s:
  print(i)

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

upper = min(a + k, b)
bottom = max(b - k + 1, upper)

for i in range(a, upper):
    print(i)
for j in range(bottom, b + 1):
    print(j)

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):
import sys
import os
import math

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

MOD = 10 ** 9 + 7


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

    A, B, K = il()
    ret = set()
    for n in range(A, min(A+K, B)):
        ret.add(n)
    for n in range(max(B-K+1, A), B+1):
        ret.add(n)
    print(*sorted(ret), sep="\n")


if __name__ == '__main__':
    main()

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

ans = set()
tmp = 0
for i in range(a, b + 1):
    tmp += 1
    if tmp <= k:
        ans.add(i)
    else:
        break
        
tmp = 0
for j in range(b, a - 1, -1):
    tmp += 1
    if tmp <= k:
        ans.add(j)
    else:
        break

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

Solution (Python):
a,b,k=map(int,input().split())
if k > b-a:
    k = b-a+1
print('\n'.join(map(str,sorted(set(range(a,a+k)) | set(range(b-k+1,b+1))))))

Solution (Python):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

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

for k in l:
    print(k)

Solution (Python):
import sys

def resolve():
    A, B, K = list(map(int, input().split(" ")))
    out = []
    for i in range(A, A+K):
        if i <= B:
            out.append(i)
    for j in range(B-K+1, B+1):
        if j >= A and not j in out:
            out.append(j)
    
    [print(s) for s in out]

if '__main__' == __name__:
    resolve()

Solution (Python):
a,s,k=map(int,input().split())
if s-a<=2*k-1:print(*list(range(a,s+1)),sep="\n")
else:print(*list(range(a,a+k))+list(range(s+1-k,s+1)),sep="\n")

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]:
  if a+k <= b-i:
    print(b-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 = list(map(int, input().split()))
left = set(list(range(A, min(B, A + K))))
right = set(list(range(max(B - K + 1, A) , B + 1)))
[print(i) for i in sorted(list((left | right)))]

Solution (Python):
a,b,k=[int(i) for i 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):
        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 a in range(A, A + K):
        print(a)
    for b in range(B - K + 1, B + 1):
        print(b)

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

Solution (Python):
a, b, k = map(int, input().split())
print(*[i for i in range(a, b+1) if i < a+k or i > b-k], sep="\n")

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

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

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

Solution (Python):
A, B, K = map(int, input().split())
ans = []
for i in range(A,A+K):
    if i<=B and i not in ans:
        ans.append(i)
for i in range(B-K+1,B+1):
    if i>=A and i not in ans:
        ans.append(i)
print(*ans, sep='\n')

Solution (Python):
A, B, K = map(int, input().split())
ans = []
for i in range(A,A+K):
  if i<=B and i not in ans:
    ans.append(i)
for i in range(B-K+1,B+1):
  if i>=A and i not in ans:
    ans.append(i)
print(*ans, sep='\n')

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

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

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


    ans.append(B-i)
    if i >(B-A-1):
        break
ans = list(set(ans))
ans.sort()
for i in ans:
    print(i)

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

print(A)

max_A = A

for _ in range(1, K):
    max_A += 1
    if max_A > B:
        break
    print(max_A)

min_B = B - K + 1
if min_B < max_A:
    min_B = max_A
if min_B > max_A:
    print(min_B)

while min_B < B:
    min_B += 1
    if min_B > max_A:
        print(min_B)

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())
if b-a > pow(10, 5):
    list_ANS = [i for i in range(a, a+pow(10, 5))] + [i for i in range(b - pow(10, 5), b+1)]
else:
    list_ANS = [i for i in range(a, b+1)]

for _ in range(k):
    if len(list_ANS) != 0:
        a = list_ANS.pop(0)
        print(a)
    else:
        break
list_A = []
for _ in range(k):
    if len(list_ANS) != 0:
        b = list_ANS.pop(-1)
        list_A.append(b)

    else:
        break
if len(list_A) != 0:
    list_A.reverse()
    for i in list_A:
        print(i)

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

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

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

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

ans = []
for i in range(a, min(b, a + k)):
    if i in ans:
        continue
    else:
        ans.append(i)
for i in range(max(a, b - k + 1), b + 1):
    if i in ans:
        continue
    else:
        ans.append(i)

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

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

ans=[]

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

for a in ans:
  print(a)

Solution (Python):
a,b,k=map(int,input().split())
c=[0]*2*k
for i in range(k):
    c[i]=min(a+i,b)
    c[k+i]=max(b-i,a)
c=sorted(set(c))

for i in c:
    print(i)

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


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

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

res = []
for i in range(a, min(b + 1, a + k)):
    res.append(i)


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

res = sorted(res)
for i in res:
    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)
  if B - i >= A:
    ans.append(B - i)
ANS = list(set(ans))
ANS.sort()
[print(j) for j in ANS]

Solution (Python):

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

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

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

    array = range(a,b+1)
    ans = list(set(array[:k]) | set(array[-k:]))
    ans.sort()
    for val in ans:
        print(val)


if __name__ == '__main__':
    main()

Solution (Python):










"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""
 
def main():
  a,b,k = map(int,input().split())
  L = []
  R = []
  for i in range(k):
    if a<=a+i<=b:
      L.append(a+i)
  for j in range(-k+1,1,1):
    if a<=b+j<=b:
      R.append(b+j)
  L[len(L):len(L)] = R
  W = sorted(list(set(L)))
  for i in range(len(W)):
    print(W[i])
if __name__ == '__main__':
  main()

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,c=map(int,input().split()) 
l=list(range(a,b+1)[0:c]) 
m=list(range(b,a-1,-1)[0:c]) 
ans=sorted(set(l+m)) 
print(*ans)

Solution (Python):
a,b,k=map(int,input().split())
if k <= (b-a+1)//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):
A, B, K = map(int, input().split())
if K <= (B - A + 1) // 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):
a, b, k = map(int, input().split())
s = []
for i in range(k):
    if a + i <= b:
        s.append(a + i)
for i in range(k):
    if b - k + i + 1 >= a:
        s.append(b - k + i + 1)
s = list(set(s))
s.sort()
for i in s:
    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, A) , B):
  if i + 1 >= A + K: print(i + 1)

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

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

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

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

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

Solution (Python):

import math
import itertools
import statistics


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

"""
if k > b-a:
    k = b-a
"""

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


ans = list(set(l))
ans.sort()
for i in range(len(ans)):
    if ans[i] >= a and ans[i] <= b:
        print(ans[i])

Solution (Python):
import sys

def solve():
    input = sys.stdin.readline
    A, B, K = map(int, input().split())
    Ans = set()
    for i in range(A, min(A + K, B + 1)): Ans |= {i}
    for i in range(max(A, B - K + 1), B + 1): Ans |= {i}
    Ans = list(Ans)
    Ans.sort()
    print("\n".join(map(str, Ans)))
        
    return 0

if __name__ == "__main__":
    solve()

Solution (Python):
a,b,k = map(int,input().split())
ans = []
ans += list(range(a,min(a+k,b+1) ) )
ans += list(range(max(a,b-k+1), b+1))
ans = list(set(ans))
ans.sort()
print(*ans)

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

aa = [i for i in range(a, a+k)]
bb = [i for i in range(b-k+1,b+1)]
c = [i for i in set(aa + bb) if a <= i <= b]
[print(i) for i in sorted(c)]

Solution (Python):
A, B, K = map(int, input().split())
x1 = set(range(A, A+K))
x2 = set(range(B, B-K, -1))
x = x1 | x2
ans = sorted(x)
for i in [x for x in ans if A <= x <= B]:
    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)
    exit()
for i in range(A, A + K):
    print(i)
for i in range(B - K + 1, B + 1):
    print(i)

Solution (Python):

import sys
A,B,K=map(int,input().split())
if((B-A) < K):
    for i in range(A,B+1):
        print(i)
    sys.exit()
ansmin=[i for i in range(A,A+K,1)]
ansmax=[i for i in range(B,B-K,-1)]

ans=ansmin+ansmax
ans=set(ans)
ans=sorted(ans)
for a in ans:
    print(a)

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=list(map(int,input().split()))
L=[]
k=0
for i in range(A,B+1):
    L.append(i)
    k+=1
    if(k>=K):
        break

k=0
for i in range(B,A-1,-1):
    L.append(i)
    k+=1
    if(k>=K):
        break

S=set(L)
for s in sorted(list(S)):
    print(s)

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 = sorted(set(l), key=l.index)
l.sort()
print(*l, sep="\n")

Solution (Python):
A,B,K=map(int, input().split())
L = []
for i in range(min(K,(B-A+2)//2)):
  L.append(A+i)
for i in range(min(K,(B-A+2)//2)):
  L.append(B-i)
L = sorted(list(set(L)))
for i in L:
  print(i)

Solution (Python):
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')


A, B, K = MI()

ans = set(x for x in range(A, A + K) if A <= x <= B)
ans.update(set(x for x in range(B - K + 1, B + 1) if A <= x <= B))
for x in sorted(list(ans)):
    print(x)

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

Solution (Python):
a,b,k=map(int,input().split())
s=set()
for i in range(a,a+k):
    if i<=b:
        s.add(i)
for i in range(b,b-k,-1):
    if i>=a:
        s.add(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(A,K+A):
    if i > B:
        break
    ans.append(i)

for i in range(B-K+1,B+1):
    if i < A:
        continue
    ans.append(i)

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

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

X = []

for i in range(k):
    if a+i <= b:
        X.append(a+i)
    if a <= b-i:
        X.append(b-i)
        
X = sorted(set(X))

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

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

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

ans=set()
for i in range(k):
	if a+i<=b:
		ans.add(a+i)

for i in range(k):
	if b-i>=a:
		ans.add(b-i)

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

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

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

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

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

for i in sorted(set(l)):
    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 j in range(a, a+k):
        print(j)
    for k in range(b-k+1, b+1):
        print(k)

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

Solution (Python):
def main():
    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(b, max(a-1, b-k), -1):
        s.add(i)

    s = sorted(s)

    for i in s:
        print(i)


if __name__ == "__main__":
    main()

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

s=set()

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


lis=sorted(s)
for item in lis:
  print(item)

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

N = set()
for i in range(A, min(A + K, B + 1)):
    N.add(i)
for i in range(B, max(B - K, A - 1), -1):
    N.add(i)

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

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

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

for j in range(b,max(a-1,b-k),-1):
    li.append(j)

li=list(set(li))
li.sort()

for i in li:
    print(i)

Solution (Python):
def Small_and_Large(a , b , k):

    ans = []

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

    return sorted(set(ans))

def main():
    a , b , k = map(int , input().split())
    ans = Small_and_Large(a, b, k)
    for i in ans:
        print(i)


if __name__ == '__main__':
    main()

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

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

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

a,b,c = int(data[0]), int(data[1]), int(data[2])

for i in range (a, min(b+1,a + c)):
    if (i < a + c or i > b - c):
        print(i)

for j in range (max(i + 1, b - c + 1), b + 1):
    if (j < a + c or j > b - c):
        print(j)

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

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

Solution (Python):
A,B,K = map(int,input().split())
s = set()
for i in range(K):
    tmp = A+i
    if (tmp >= A)and(tmp <= B):
        s.add(tmp)

for i in range(B-K,B):
    tmp = i+1
    if (tmp >= A)and(tmp <= B):
        s.add(tmp)

l = list(s)
l.sort()

for i in l:
    print(i)

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

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

Solution (Python):
A,B,K=map(int,input().split())
answers=[]
for a in range(K):
    if A+a<=B and not A+a in answers:
        answers.append(A+a)
for b in range(K):
    if B-b>=A and not B-b in answers:
        answers.append(B-b)
answers=sorted(answers)
for a in answers:
    print(a)