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 < 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(lambda x: int(x), input().split(" ")))
ans = []
for i in range(A, min([A + K, B + 1])):
  ans.append(i)
for j in range(max([B - K + 1, A]), B + 1):
  ans.append(j)

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

print("\n".join(list(map(lambda s: str(s), ans))))

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

Solution (Python):
mini, maxi, K_ban = map(int, input().split())

if (maxi - mini + 1 <= 2 * K_ban):
    ans = [i for i in range(mini, maxi + 1)]

else:
    left = [i for i in range(mini, mini + K_ban)]
    right = [i for i in range(maxi - K_ban + 1, maxi + 1)]
    
    ans = left + right
    

[print(n) for n in ans]

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

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

A, B, K = 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+1), B+1):
    l.append(i)

l = list(set(l))
l.sort()
print(*l, sep="\n")

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

a,b,k=map(int,input().split())
ans=[]
for i in range(a,min(a+k,b+1)):
  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())
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())
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())

r = []

for i in range(A, min(A + K, B)):
    print(i)
    r.append(i)

for i in range(max(A, B - K + 1), B + 1):
    if not i in r:
        print(i)

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

Solution (Python):
A,B,K=map(int,input().split())
ans = set(range(A,min(A+K,B+1))).union(set(range(B,max(A-1,B-K),-1)))

print(*sorted(ans))

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,0):
    if B + i >= A:
        ans.append(B + i + 1)
ans = list(set(ans))
ans = sorted(ans)
for i in range (len(ans)):
    print(ans[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 - k + 1), (b + 1)):
        print(i)

Solution (Python):

















import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

from bisect import bisect_left

A, B, K = MAP()
s = set()
for i in range(K):
    x = A + i
    if A <= x <= B:
        s.add(x)
for i in range(K):
    x = B - K + 1 + i
    if A <= x <= B:
        s.add(x)
for x in sorted(s):
    print(x)

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

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

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

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

if ((B + 1) - A ) / 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())
num = []

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

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

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

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




















l_ans = set()

count = 1
for i in range(a, b + 1):
    if count <= k:
        l_ans.add(i)
    else:
        break
    count += 1

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

for num in sorted(l_ans):
    print(num)

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

ans_A = []
ans_B = []
for i in range(a, min(b, a + k)):
    ans_A.append(i)
for i in range(max(a, b - k + 1), b+1):
    ans_B.append(i)
ans = sorted(list(set(ans_A) | set(ans_B)))

for i in ans:
    print(i)

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

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

Solution (Python):
a, b, k = list(map(int, input().split()))
al, bl = [], []
if a == b:
    print(a)
else:   
    for i in range(min(b-a,k)):
        al.append(a+i)
        bl.append(b-i)
        ans = list(set(al) | set(bl))
    ans.sort()
    for i in ans:
        print(i)

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

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

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

Solution (Python):
a,b,k=map(int,input().split());r=range(a,b+1);print(*sorted({*r[:k]}|{*r[-k:]}))

Solution (Python):

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

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

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

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

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

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

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

Solution (Python):
A, B, K = input().split(' ')
A = int(A)
B = int(B)
K = int(K)
N = []
if B-A>K:
  for i in range(A, A+K):
    print(i)
    N.append(i)
  for i in range(B-K+1, B+1):
    if not i in N:
      print(i)

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

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

L = list(range(A, min(B, A+K))) + list(range(max(A, B-K+1), B+1))
L_no_duplication = set(L)
print(*sorted(L_no_duplication), sep="\n")

Solution (Python):
MM = input().split()
A = int(MM[0])
B = int(MM[1])
K = int(MM[2])
MM = set()
for i in range(A, A+K):
  if i <= B:
    MM.add(i)
for i in reversed(range(B-K+1,B+1)):
  if i >= A:
    
    MM.add(i)

MM = sorted(MM)

for i in MM:
  print(i)

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




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())
ans = set()
arr = range(A, B+1)
for a in arr[:K]:
    ans.add(a)
for a in arr[-K:]:
    ans.add(a)

ans = list(ans)
ans.sort()

for a in ans:
    print(a)

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

Solution (Python):
A,B,K = (int(X) for X in input().split())
Low  = list(range(A,min(B+1,A+K)))
High = list(range(B,max(A-1,B-K),-1)) 
Num  = sorted(set(Low+High))
print('\n'.join(str(X) for X in Num))

Solution (Python):
A,B,K=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),B+1):l.append(i)
l=sorted(list(set(l)))
for i in l:print(i)

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

answer = []
for i in range(0,k):
  if a+i <= b:
    answer.append(a+i)
  else:
    break
  
for i in range(0,k):
  if b-i >= a:
    answer.append(b-i)
  else:
    break  
    
answer = list(set(answer))  
answer.sort()

for a in answer :
  print(a)

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

Solution (Python):
A,B,K = [int(i) for i in input().split()]
ans = list(set([i for i in range(A,min(A+K, B+1))] + [j for j in range(max(A, B-K+1),B+1)]))
ans.sort()
print("\n".join(map(str, ans)))

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

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

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

Solution (Python):
4,5,6,7,8,9,10
a, b , k = map(int, input().split())
if k > (b-a)//2:
  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, open(0).read().split())

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

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

lst = []

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

for j in range(K):
    if A <= B - j:
        lst.append(B-j)
    else:
        break

lst = sorted(list(set(lst)))

for l in lst:
    print(l)

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

if B-A > K:
    ax = [i for i in range(A,A+K)]
    bx = [i for i in range(B-K+1,B+1)]
    sum = sorted(list(set(ax + bx))) 
else:
    sum = [i for i in range(A,B+1)]

for i in sum:
    print(i)

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

for i in range(a,a+k):
    if i <= b:
        print(i)

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

Solution (Python):
def solve():
    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)


if __name__ == "__main__":
    solve()

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

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

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

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

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

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

ans = []


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

for j in range(B, B - K, -1):
    if j >= A:
        ans.append(j)

ans = sorted(set(ans))

for x in ans:
    print(x)

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, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext

def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

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

    ans_list = []

    for i in range(a,a+k):
        if i > b:
            continue
        ans_list.append(i)

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

    ans_list = list(set(ans_list))

    for num in ans_list:
        print(num)

if __name__ == '__main__':
    main()

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

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

for n in range(A,min(A+K,B+1)):
  L.append(n)
  
for n in range(max(A,B-K),B+1):
  M.append(n)
  
L = sorted(set(L[:K]+M[-K:]))
  
print(*L,sep="\n")

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

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

Solution (Python):
def main():
    A, B, K = map(int, input().split())
    ans = []
    for v in range(A, min([A+K, B+1])):
        ans.append(v)
    for v in range(max([A, B-K+1]), B+1):
        if v not in ans:
            ans.append(v)
    print("\n".join([str(v) for v in ans]))


if __name__ == '__main__':
    main()

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

Solution (Python):
a, b, k = map(int, input().split())
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())
ans = []
for i in range(k):
    if a + i <= b:
        ans.append(a + i)
for j in range(b - k + 1, b + 1):
    if j not in ans and a <= b - k + 1:
        ans.append(j)
for k in range(len(ans)):
    print(ans[k])

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

Solution (Python):

a, b, k = map(int, input().split())
if (b - a) // 2 + 1 < k:
    print(*range(a, b + 1), sep="\n")
else:
    print(*sorted(set([*range(a, a + k)] + [*range(b - k + 1, b + 1)])),
          sep="\n")

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

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

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

L = set()
for i in range(min(K, B-A+1)):
    L.add(A+i)
    L.add(B-i)
L = sorted(list(L))
for i in range(len(L)):
    print(L[i])

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

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

t = list(set(t))
t.sort()

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

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

m = set(range(a, min(a+k, b)))
n = set(range(max(a, b-k+1), b+1))
l = m | n

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

Solution (Python):
def main():
  a,b,k = list(map(int,input().split()))
  minlist=[]
  maxlist=[]
  ans=[]
  for i in range(0,k):
    if b-i>=a:
      minlist.append(a+i)
    if b-i>=a+k:
      maxlist.insert(0,b-i)
  ans=minlist+maxlist
  set(ans)
  for i in range(0,len(ans)):
    print(ans[i])
main()

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

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

A,B,K = list(map(int,input().split()))
num_lis = []
for i in range(A,A+K):
    if i <= B:
        num_lis.append(i)
    else:
        break
    
for i in range(B,B-K,-1):
    if i>= A:
        num_lis.append(i)
    else:
        break
b = sorted(list(set(num_lis)))

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

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

for i in range(B, B-K,-1):
  if i < A:
    break
  if not i in l:
    l.append(i)
l.sort()

for i in l:
  print(i)

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

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()


def main():
    a, b, k = map(int, input().split())
    ans = set()
    for i in range(k):
        if a + i + 1 <= b: ans.add(a + i)
        if b - i >= a: ans.add(b - i)
    ans = list(ans)
    ans.sort()
    for x in ans: print(x)

if __name__ == "__main__":
    main()

Solution (Python):
import sys, os, math, bisect, itertools, collections, heapq, queue

from decimal import Decimal
from collections import defaultdict, deque



sys.setrecursionlimit(10000000)

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

lcm = lambda x, y: (x * y) // math.gcd(x, y)


MOD = 10 ** 9 + 7
MAX = float('inf')


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

    A, B, K = il()
    st = set()
    for a in range(A, A + K):
        if a > B: break
        st.add(a)
    for b in reversed(range(B - K+1, B+1)):
        if b < A: break
        st.add(b)
    print(*sorted(st), sep="\n")


if __name__ == '__main__':
    main()

Solution (Python):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

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

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

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

ak = a + k
bk = b - k + 1

for i in range(a, min(ak, b+1)):
    print(i)
for i in range(max(ak, bk), b + 1):
    print(i)

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

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

for i in sorted(set(ans)): 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)

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

Solution (Python):

import sys
from collections import deque, defaultdict
from math import sqrt, factorial





def solve():
    a, b, k = [int(x) for x in input().split()]
    ans = set()

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

t = 1

for case in range(1,t+1):
    ans = solve()




"""

4
1 2
2 4
1 3
3
2 2 4
4 5 6

6
1 2
2 3
3 4
4 5
4 6
3
3 5 6
2 17 31 5 11

"""

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

min = [0] * k
max = [0] * k

for i in range(k):
  if a+i > b:
    break
  min[i] = a+i

for n in range(k):
  if b-n < a:
    break
  max[n] = b-n

ans = min + max
ans = set(ans)
ans = list(ans)
ans.sort()

for j in ans:
  if j == 0:
    continue
  print(j)

Solution (Python):
def actual(A, B, K):
    min_left = A
    max_left = min(A + (K - 1), B)

    min_right = max(B - (K - 1), max_left + 1)
    max_right = B

    left = set(range(min_left, max_left + 1))
    right = set(range(min_right, max_right + 1))

    unique_nums = left | right

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

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

Solution (Python):
def actual(A, B, K):
    min_a = A
    max_a = min(A + (K - 1), B)

    min_b = max(B - (K - 1), max_a + 1)
    max_b = B

    left = list(range(min_a, max_a + 1))
    right = list(range(min_b, max_b + 1))

    return '\n'.join(map(str, sorted(set(left + right))))

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

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

Solution (Python):
A,B,K=map(int,input().split())
S=(set(range(A,A+K))|set(range(B-(K-1),B+1)))
S=list(S)
S.sort()

for x in S:
    if A<=x<=B:
        print(x)

Solution (Python):
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

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

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

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

N = B - A + 1
limit = int(N / 2)
if K > limit:
  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())
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())
ans1 = [i for i in range(a,min(a+k,b+1))]
ans2 = [i for i in range(max(b-k+1,a),b+1)]

ans = set(ans1 + ans2)

print(*sorted(ans),sep="\n")

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

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

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

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

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

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

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

    for i in reversed(range(b-k+1,b+1)):
        ans.add(i)

ans = list(ans)
ans.sort()

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

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

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())
if b - a + 1 <= k * 2:
  for i in range(a, b + 1):
    print(i)
  exit()
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(a,min(a+k,b+1),1):
    ans.append(i)
for i in range(b,max(a-1,b-k),-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())

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

Solution (Python):
a,b,k=map(int,input().split())
ans=[]
for i in range(a,min(a+k,b+1),1):
    ans.append(i)
for i in range(b,max(a,b-k),-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())
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):
def solve():
    a, b, k = map(int, input().split())
    ans = list()
    for i in range(a, min(a+k, b+1), 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)
    return 0

if __name__ == "__main__":
    solve()

Solution (Python):
def resolve():
    A, B, K = [int(i) for i in input().split()]
    offset = 0
    while offset < K and A + offset <= B:
        print(A + offset)
        offset += 1
    begin = A + offset
    r = max(B - K + 1, begin)
    while r <= B:
        print(r)
        r += 1


resolve()

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

ansl=[]

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

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

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):
A, B, K = map(int, input().split())
if K > B-A:
    ans = list(range(A, B+1))
else:
    ans = list(range(A, A+K)) + list(range(B, B - K, -1))
ans = list(set(ans))
ans.sort()
print(*ans, sep='\n')

Solution (Python):

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


if A + K > B:
    res = list(range(A, B + 1))
else:
    res = set(list(range(A, A + K)) + list(range(B, B - K, -1)))
    
for n in sorted(list(res)):
    print(n)

Solution (Python):
a,b,k = map(int,input().split())
n = b - a + 1
if n <= k*2:
  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,a+k):
    if i <= b:
        ans.append(i)
if b-a+1 >= 2*k:
    for j in range(b-k+1,b+1):
        ans.append(j)
else:
    for j in range(a+k,b+1):
        if j <= b:
            ans.append(j)

for i in range(len(ans)):
    print(ans[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-1:
        print(b-i)

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

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

for i in range(len(ans)):
    print(ans[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-1:
        print(b-i)

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)