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())
down = a + k - 1
up = b - k + 1

if down < up:
    for i in range(a, down+1):
        print(i)
    for i in range(up, b+1):
        print(i)
    exit()

if down >= up:
    for i in range(a, b+1):
        print(i)
    exit()

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

z = []

for x in range(a,a+k):
  if x == (b+1):
    break
  z.append(x)

for x in range(b,b-k,-1):
  if x == (a-1):
    break
  z.append(x)

z = list(set(z))
z.sort()

for x in z:
  print x

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

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

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

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

Solution (Python):

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

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

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

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

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

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

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

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

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

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

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

t = []

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

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

y = list(set(t))

for x in sorted(y):
    print(x)

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

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

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

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

st = A

di = {}
o = []

for i in range(K):
    if A<=st+i and st+i<=B:
        di[st+i] = 1

st = B+1-K

for i in range(K):
    if A <= st + i and st + i <= B:
        di[st+i] = 1

for ke in di.keys():
    o.append(ke)

o.sort()

for item in o:
    print(item)

Solution (Python):
import re
import sys

if __name__ == '__main__':
    a,b,k = map(int , raw_input().split())
    l = []
    for i in range(k):
        if a + i <= b:
            print a + i
            l.append(a+i)
    for i in range(k):
        if (b - k + i + 1) not in l and (b - k + i + 1) >= a:
            print b - k + i + 1

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

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

last = A+K if A+K < B else B
for i in range(A, last):
    print(i)
first = B-K+1 if B-K+1 > last else last
for i in range(first, 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)
    else:
        break

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

ans2 = sorted(list(set(ans)))

for a in ans2:
    print(a)

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

for i in range(K):
    if A + i <= B:
        print(A + i)

for j in range(K):
    if (B - K + j + 1 > A + K - 1) and (B - K + j + 1 <= B):
        print(B - K + j + 1)

Solution (Python):



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


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

Solution (Python):


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

result = []

for i in range(k):
    result.append(a + i)

for i in range(k):
    result.append(b - k + i + 1)

for c in sorted(list(set(result))):
    if a <= c <= b:
        print(c)

Solution (Python):
a, b, k = map(int, input().split())
count = 0
ls = []
for x in range(a, b):
    count += 1
    if count <= k and x not in ls:
        ls.append(x)
    if count > k:
        break
count = 0
for x in range(b, a-1, -1):
    count += 1
    if count <= k and x not in ls:
        ls.append(x)
    if count > k:
        break
ls.sort()
for x in range(len(ls)):
    print(ls[x])

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

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

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

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

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

result = list(set(result))
result.sort()
for r in result:
    print(r)

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

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

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

Solution (Python):
def inpl(): return list(map(int, input().split()))
A, B, K = inpl()
ans = []
for i in range(K):
    ans.append(A+i)
    ans.append(B-i)
for i in sorted(set(ans)):
    if A <= i and i <= B:
        print(i)

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

Solution (Python):

"""
B - Small and Large Integers
https://beta.atcoder.jp/contests/abc093/tasks/abc093_b

"""
import sys
from sys import stdin
input = stdin.readline


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

    for x in range(A, A+K):
        if x <= B:
            ans.add(x)
    for x in range(B-K+1, B+1):
        if x >= A:
            ans.add(x)

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


if __name__ == '__main__':
    main(sys.argv[1:])

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

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