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

Solution (Python):
import sys
import math
import bisect

def solve(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)
    ans = list(sorted(set(ans)))
    return ans

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

if __name__ == "__main__":
    main()

Solution (Python):
a,b,k = map(int,input().split())
ans_list = []
for i in range(a,a+k):
    ans_list.append(i)
    if ans_list[-1] == b:
        [print(i) for i in ans_list]
        exit()
for i in range(b-k+1,b+1):
    if ans_list.count(i) == 0:
        ans_list.append(i)
[print(i) for i in ans_list]

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

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

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

tmp_s = {i for i in range(A, A+K)}
tmp_l = {i for i in range(B+1-K, B+1)}

ans = list(tmp_s.union(tmp_l))
ans = [i for i in ans if A<=i<=B]
ans.sort()

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

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

"""
Created on Wed May 13 17:30:58 2020

@author: shinba
"""

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

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

Solution (Python):
A,B,K = map(int, input().split())
if B-A+1 >= K:
    s = [i for i in range(A,A+K)]
    l = [j for j in range(B-K+1,B+1)]
    for k in l:
        s.append(k)
    w = sorted(set(s))
else:
    w = [b for b in range(A,B+1)]
for j in w:
    print(j)

Solution (Python):
import math
a , b , k = map(int , input().split())
ans = set()
for i in range(min(k , math.ceil((b - a + 1) / 2))):
  ans.add(a + i)
  ans.add(b - i)
ans = sorted(list(ans))
print('\n'.join([str(n) for n in ans]))

Solution (Python):

def main():
    a, b, k = map(int, input().split())
    r = set()
    for i1 in range(a, min(a + k, b)):
        r.add(i1)
    for i2 in range(max(a, b - k + 1), b + 1):
        r.add(i2)
    r = list(r)
    r.sort()
    for j in r:
        print(j)

if __name__ == '__main__':
    main()

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

if A+K-1 < B-K+1:
    l = list(range(A, A+K))+list(range(B-K+1, B+1))
else:
    l = list(range(A, B+1))

for v in l:
    print(v)

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

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

Solution (Python):
a,b,k = map(int,input().split())
if b+2 <= 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+1-k,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,N=list(map(int,input().split()))
l=set()
for i in range(A,A+N):
    if i > B:
        break
    l.add(i)
for i in reversed(range(B-N+1,B+1)):
    if i < A:
        break
    l.add(i)
l=list(l)
l.sort()
for i in l:
    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):


import sys
input= lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**9)
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))

from collections import Counter
def resolve():
    A,B,K=pin()
    s=set()
    for i in range(K):
        if A+i<=B:s.add(A+i)
    
    for k in range(K):
        if (B+k-K+1)>=A: s.add(B+k-K+1)
    print(*sorted(list(s)),sep='\n')
    

resolve()

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

for i in range(K):
    ans.add(A + i)
    ans.add(B - i)
ans = [a for a in ans if A <= a <= B]
print(*sorted(ans), sep='\n')

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

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

if __name__ == '__main__':
    main()

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

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

for small in range(a, min(a + k, b + 1)):
    result.add(small)

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

result = sorted(list(result))

for r in result:
    print(r)

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

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

Solution (Python):
A,B,K = list(map(int,input().split()))
s = set()
for i in range(0,K):
    s.add(A+i)
for i in range(0,K):
    s.add(B-i)
l = sorted(filter(lambda x: A <= x <=B,list(s)))
for i in l:
    print(i)

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

Solution (Python):
import sys

input = sys.stdin.readline


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

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

    ans = sorted(set(a + b))
    print(*ans, sep="\n")


if __name__ == "__main__":
    main()

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

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

print(*l, sep="\n", end="")

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())
ans = []

if B + 1 - A < 2 * K:
  ans = [i for i in range(A, B + 1)]
else:
  ans = [i for i in range(A, A + K)] + [i for i in range(B + 1 - K, B + 1)]
for a in ans:
  print(a)

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

Solution (Python):
A, B, K = map(int, input().split())
for n in sorted(filter(lambda n: A <= n <= B , set(range(A, A + K)) | set(range(B - K + 1, B + 1)))):
    print(n)

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

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

if (B - A) // 2 < K:
    num_list = [i for i in range(A, B+1)]
    for i in num_list:
        print(i)
else:
    left = [i for i in range(A, A+K)]
    right = [i for i in range(B-K+1, B+1)]
    num_list = left + right
    for i in num_list:
        print(i)

Solution (Python):
a,b,k = map(int,input().split())
ak = a+k
bk = b-k

if a+k>=b:
  for i in range(a,b+1):
    if i<ak or i>bk:
      print(i)
else:
  for i in range(a,a+k+1):
    if i<ak or i>bk:
      print(i)
  if i<b-k:
    for n in range(b-k,b+1):
      if n<b-k or n>bk:
        print(n)
  else:
    for j in range(i+1,b+1):
      if j<ak or j>bk:
        print(j)

Solution (Python):
a, b, k = map(int, input().split())
ans_list = list()
for i in range(a, min(a + k, b + 1)):
    ans_list.append(str(i))
for j in range(max(a, b - k + 1), b + 1):
    if str(j) not in ans_list:
        ans_list.append(str(j))
print("\n".join(ans_list))

Solution (Python):
import sys
import math

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

A_th = B+1 if A+K > B+1 else A+K
A_l = list(range(A, A_th, 1))


B_th = B-K+1 if B-K > A-1 else A
B_l = list(range(B_th, B+1, 1))


X_l = sorted(set(A_l + B_l))

for x in X_l:
  print(x)

Solution (Python):

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

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

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

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

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

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

for num in range(k):
    if a + num <= b:
        ans_set.add(a + num)

for num in range(k):
    num = k - num - 1
    if b - num >= a:
        ans_set.add(b - num)
for num in sorted(ans_set):
    print(num)

Solution (Python):

import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi

A, B, K = ri_()
a = [i for i in range(A, B + 1) if i <= A + K - 1 or i >= B - K + 1]
for ai in a:
    print(ai)

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

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

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

Solution (Python):
import sys

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

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

 
if b < a + k:
    print(b)
    sys.exit()

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

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

def it():
    for i in range(a, min(a+k, b)):
        yield i

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

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

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

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)

for j in range(k):
    if b-j not in ans and b-j>=a:
        ans.append(b-j)

ans.sort()
for num in ans:
    print(num)

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

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

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

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

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

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

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

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

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

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

hoge = [A + i for i in range(K) if A + i <= B]
huga = [B - i for i in range(K) if A <= B - i]
for x in sorted(set(hoge+huga)):
    print(x)

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

ans = []
end = A + K if A + K < B else B
for a in range(A, end):
    ans.append(a)

start = B - K + 1 if B - K + 1 > A else A
for b in range(start, B + 1):
    ans.append(b)

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

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

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

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

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7


a,b,k=MI()
u=[]
ans=[]
for i in range(a,a+k):
    u.append(i)
for j in range(b-k+1,b+1):
    u.append(j)
for s in u:
    if a<=s<=b:
        ans.append(s)
printni(sorted(list(set(ans))))

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

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

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

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

List = list(set(List))
List= sorted(List)
for i in List:
  print(i)

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

li = []
for i in range(a, min(a+k,b+1)):
    li.append(i)
for i in range(max(b-k+1, a), b+1):
    li.append(i)
for i in sorted(list(set(li))):
    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())

aa = list(range(a,min(a+k,b)))
bb = list(range(max(b-k+1,a),b+1))
aa.extend(bb)
c = set(aa)
d = list(c)
d = sorted(d)
for i in range(len(d)):
    print(d[i])

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

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

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

Solution (Python):
A, B, K = map(int, input().split())
x = A
y = B
ans = set()
for _ in range(K):
  if A <= x <= B:
    ans.add(x)
  if A <= y <= B:
    ans.add(y)
  x += 1
  y -= 1

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

Solution (Python):
import sys

input = sys.stdin.readline
MOD = 1000000007

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

res = []
for i in range(A,min(A+K,B+1)):
    res.append(i)

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

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

Solution (Python):


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

range1=[a,min(b,a+k-1)]
range2=[max(a,b-k+1),b]

if range1[1]>=range2[0]:
    for i in range(a,b+1):
        print(i)
else:
    for i in range(range1[0],range1[1]+1):
        print(i)
    for i in range(range2[0],range2[1]+1):
        print(i)

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

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

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

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

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

for i in range(k)[::-1]:
    if b - i > prev:
        print(b - i)

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

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

Solution (Python):
A,B,K = map(int, input().split())
ans = []
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(reverse=False)
for i in ans:
  if i>=A and i<=B:
    print(i)

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

ans = set([])
if b > a+k:
    for i in range(a,a+k):
        ans.add(i)
    for i in range(b-k+1,b+1):
        ans.add(i)
else:
    for i in range(a,b+1):
        ans.add(i)
ans = sorted(ans)
for i in ans:
    print(i)

Solution (Python):
a, b, k = map(int, input().split())
la = list(range(a, a+k))
lb = list(range(b-k+1, b+1))
set = sorted(set(la+lb))

for i in set:
    if a <= i <= b:
        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, groupby
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
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

A, B, K = MAP()

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

if (B - A + 1 <= K):
    for i in range(A, B + 1):
        print(i)
    exit()
else:
    L = []
    for i in range(K):
        L.append(A + i)

    for j in range(K - 1, -1, -1):
        L.append(B - j)

    for i in sorted(list(set(L))):
        print(i)

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





S=set()

for i in range(A, min(B+1, A+K)):
    S.add(i)
for i in range(max(A, B-K+1), B+1):
    S.add(i)
for k in sorted(S):
    print(k)

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

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())
for i in range(A, min(A+K, B+1)):
    print(i)
for j in range(max(B-K+1, A+K), B+1):
    print(j)

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

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

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

Solution (Python):
import collections
a,b,k = map(int,input().split())
n = b-a +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 j in range(b+1-k,b+1):
        print(j)

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

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

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

Solution (Python):
A, B, K = map(int, input().split())
list = [i for i in range(A, A+K)]
list.extend(i for i in range(B+1-K, B+1))
list = sorted(set(list))
for i in list:
    if A<=i<=B:
        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)
print(*sorted(list(set(ans))), sep="\n")

Solution (Python):
a,b,k=map(int,input().split())
a_st=a
b_st=b
num=[]
cnt=0
for i in range(a,b+1):
    if cnt<k:
        num.append(i)
        cnt+=1
    else:
        break
cnt=0
for i in range(b,a,-1):
    if cnt<k:
        num.append(i)
        cnt+=1
    else:
        break
num2=list(set(num))
num2.sort()
[print(x) for x in num2]

Solution (Python):
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

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

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


if __name__ == '__main__':
    main()

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

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

if 2*(K-1)>=B-A:
  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):
import sys
from collections import Counter
readline = sys.stdin.buffer.readline
MOD = 10**9+7

def main():
    A, B, K = map(int, readline().split())
    left = set(list(range(A, min(A+K, B+1))))
    right = set(list(range(B, max(B-K, A-1), -1)))
    ans = list(left | right)
    ans.sort()
    for i in ans:
        print(i)


if __name__ == '__main__':
    main()

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

x = b - a
if x < 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())

x = b-a
if x < 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())

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 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)
elif A+K-1>= B-K+1:
  for i in range(A,B+1):
    print(i)

Solution (Python):
def main():
    A, B, K = map(int, input().split())
    ans = set()
    for i in range(K):
        if A + i <= B:
            ans.add(A + i)
        if B - i >= A:
            ans.add(B - i)
    print('\n'.join(map(str, sorted(ans))))


if __name__ == '__main__':
    main()

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

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

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

print('\n'.join(map(str,sorted(set(min_li+max_li)))))

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

s = set()
if a==b:
    s.add(a)
for x in range(a,min(a+k,b)):
    s.add(x)
for x in range(b,max(a,b-k),-1):
    s.add(x)

l = [x for x in s]
l.sort()
for x in l:
    print(x)

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

Solution (Python):
















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

slis = []
llis = []
if 2*K>=(B-A+1):
    ans = list(range(A,B+1))
else:
    for i in range(K):
        slis.append(A+i)
        if not B-i in slis:
            llis.append(B-i)
    ans = slis + llis[::-1]

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

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

for i in range(A, min(B+1, A+K)):
    print(i)

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

Solution (Python):

import sys


def solve(A: int, B: int, K: int):
    for i in sorted(
            set(range(A, min(B + 1, A + K))) |
            set(range(max(A, B + 1 - K), B + 1))):
        print(i)


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


if __name__ == '__main__':
    main()