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

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

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

if B-A+1<= 2*K:
    print(*range(A,B+1), sep="\n")
else:
    a = list(range(A,A+K))
    b = list(range(B-K+1,B+1))
    C = sorted(set(a+b))
    print(*C, sep="\n")

Solution (Python):

import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))


A, B, K = lr()
answer = [x for x in range(A, min(A+K, B+1))] + [x for x in range(max(B-K+1, A), B+1)]
answer = sorted(set(answer))
print('\n'.join(map(str, answer)))

Solution (Python):
def main():
    import sys
    def input(): return sys.stdin.readline()[:-1]
    pl = lambda x: print(*x, sep='\n')

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

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

if __name__ == '__main__':
    main()

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

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

Solution (Python):


def main():
    a,b,k = map(int,input().split())
    s = list(set(range(a,min(a+k,b+1))) | set(range(max(b-k+1,a),b+1)))
    s = sorted(s)

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


if __name__ == '__main__':
    main()

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

Solution (Python):
def resolve():
    A, B, K = list(map(int, input().split()))
    if B - A + 1 >= 2 * K:
        ls = [i for i in range(A, A+K)] + [i for i in range(B-K+1, B+1)]
    else:
        ls = [i for i in range(A, B+1)]

    print('\n'.join(map(str, ls)))
    return

resolve()

Solution (Python):






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





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

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

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

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

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

Solution (Python):
if __name__ == '__main__':
    a, b,x = map(int, input().split())
    set1=set([i for i in range(a,min(a+x,b))])
    set2=set([i for i in range(max(a,b-x+1),b+1)])
    sumSet = set1 | set2
    list = list(sumSet)
    list.sort()

    for i in list:
        print(i)

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,0,-1):
    if b-j>=a+k-1:
        print(b-j+1)

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

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

Solution (Python):
import math
from collections import deque
from collections import defaultdict

import itertools as it


def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def combmod(n,r,mod):
	return (fact(n)/fact(n-r)*pow(fact(r),mod-2,mod))%mod
def printQueue(q):
	r=copyQueue(q)
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): 
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): 
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} 
def bitArr(n):
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): 
			k = i-a*j
			if k%b==0:
				return i
	return -1
def copyQueue(q):
	nq = queue.Queue()
	n = q.qsize()
	for i in range(n):
		x = q.get()
		q.put(x)
		nq.put(x)
	return nq
def get_sieve_of_eratosthenes(n):
	
	data = [0,0,0]
	for i in range(3,n+1,2):
		data.append(i)
		data.append(0)
	for i in range(len(data)):
		interval = data[i]
		if interval!=0:
			for j in range(i+interval,n-1,interval):
				data[j] = 0
	
	ans = data[:]
	return ans

a,b,k = readInts()

o = set(range(a,min(a+k,b)))
t = set(range(max(a,b-k+1),b+1))
ans = sorted(list(o|t))

for i in ans:
	print(i)

Solution (Python):
A, B, K = map(int, input().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)]
s = list(set(a+b))
s.sort()
for r in s:
    print(r)

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

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

N = []

for i in range(K):
    if A + i < B:
        N.append(A + i)
    if B - i >= A:
        N.append(B - i)
    
for n in sorted(set(N)):
    print(n)

Solution (Python):
A, B, K = map(int, input().split())
for i in range(A, A + K):
    if i > B:
        break
    print(i)
for j in range(B - K + 1, B + 1):
    if j < A or j <= i:
        continue
    print(j)

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

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

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 math
import re
import copy
import sys

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

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

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

Solution (Python):
A,B,K=map(int,input().split())
if B==A:
    print(A)
    exit()
K=min(K,B-A)
ans=set()
for i in range(K):
    ans.add(A+i)
    ans.add(B-i)
ans=list(ans)
ans=sorted(ans)
for i in ans:
    print(i)

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

if k < b-a+1:
    tmp1 = list(range(a, a+k))
    tmp2 = list(range(b-k+1, b+1))
    tmp1.extend(tmp2)
    tmp = sorted(list(set(tmp1)))
    
else:
    tmp = list(range(a, b+1))
    
for i in tmp:
    print(i)

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

Solution (Python):
a,b,k=map(int,input().split())
if 2*k>=(b-a+1):
  for h in range(a,b+1):
    print(h)
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())
num=set()
for i in range(a,min(a+k,b+1)):
    num.add(i)
for j in range(max(a,b-k+1),b+1):
    num.add(j)
for i in sorted(list(num)):
    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):
A,B,K = map(int, input().split())
if B - A + 1> 2*K:
    a = list(range(A, A+K))
    b = list(range(B-K+1,B+1))
    c = sorted(set(a+b))
    print(*c, sep="\n")
else:
    print(*range(A,B+1), sep="\n")

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

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

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

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

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):
import sys
a,b,k = map(int,input().split())
ans = []
if k > b-a:
    for i in range(a,b+1):
        print(i)
    sys.exit()
    
for i in range(k):
    t1 = a+i
    t2 = b-i
    ans.append(t1)
    ans.append(t2)
A = list(set(ans))
A.sort()

for i in A:
    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 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 k>(b-a):
    k=b-a
list1=[i for i in range(a,a+k)]
list1.extend([i for i in range(b-k+1,b+1)])
ans=list(set(list1))
ans.sort()
if a==b:
    ans=[a]
for i in range(len(ans)):
    print(ans[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):
def main():
    A, B, K = map(int, input().split())

    ans = list()

    ans.extend(range(A, A+K))
    ans.extend(range(B, B-K, -1))

    ans = list(set(ans))
    ans.sort()
    for a in ans:
        if A <= a <= B:
            print(a)


if __name__ == "__main__":
    main()

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

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

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

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

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

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

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

Solution (Python):
a,b,k=map(int,input().split())
if k<=(b-a+1)//2:
    A=set()
    for i in range(k):
        A.add(a+i)
        A.add(b-i)
    print(*sorted(A),sep="\n")
else:
    for i in range(a,b+1):
        print(i)

Solution (Python):


import sys






























def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    a, b, k = mi()
    for i in range(a, min(b, a+k)):
        print(i)
    for j in range(max(min(b, a+k), b-k+1), b+1):
        print(j)


if __name__ == "__main__":
    main()

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

W = list(range(A,min(A+K,B+1)))
w = list(range(max(A,B-K+1),B+1))

A = sorted(set(W+w))
for i in A: print(i)

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

ans = list(sorted(list(set(candidate1+candidate2))))
ans = [str(ans[i]) for i in range(len(ans))]

print('\n'.join(ans))

Solution (Python):
from itertools import chain
A, B, K = map(int, input().split())
L = range(A, B + 1)
if K < (B - A + 2) // 2:
    L = chain(L[:K], L[-K:])
print("\n".join(str(i) for i in L))

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

for i in range(A,min([A+K+1,B+1]),1):
  if i<A+K:
    print(i)
    
for i in range(max([A+K, B-K-1]),B+1,1):
  if i>B-K:
    print(i)

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

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

if 2*K-1 >= 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 = []
for i in range(k):
    x = a+i
    if (x not in ans) and x<=b: 
        ans.append(x)
for j in range(k,0,-1):
    x = b-j+1
    if (x not in ans) and x>=a:
        ans.append(x)
print('\n'.join(map(str,ans)))

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

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

Solution (Python):
A, B, K = map(int, input().split())
if A + K - 1 >= B - K + 1:
    print("\n".join(map(str, [i for i in range(A, B + 1)])))
else:
    print("\n".join(map(str, [i for i in range(A, A + K)])))
    print("\n".join(map(str, [i for i in range(B - K + 1, B + 1)])))

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

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

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

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

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

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

Solution (Python):

A, B, K = map(int, input().split())
a = set(i for i in range(A, min(A + K, B + 1)))
b = set(j for j in range(max(B - K + 1, A), B + 1))
c = list(a | b)
c.sort()
for k in c:
    print(k)

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

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

Solution (Python):
A, B, K = map(int, input().split())
ans1 = set()
ans2 = set()
for i in range(A, B + 1):
  if len(ans1) < K:
    ans1.add(i)
  else:
    break
    
for i in reversed(range(A, B + 1)):
  if len(ans2) < K:
    ans2.add(i)
  else:
    break

ans = ans1 | ans2
for a in sorted(list(ans)):
  print(a)

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

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

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

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

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

x = []

for i in range(0,k):
  if(a+i < a or b-i > b or a+i > b or b-i < a):
    continue
  else:
    if(a+i not in x and b-i not in x):
      if(a+i != b-i):
        x.append(a+i)
        x.append(b-i)
      else:
        x.append(a+i)
  
  
x.sort()  

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

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

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

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

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

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

Solution (Python):
A,B,K=map(int,input().split())
if A==B:
  print(A)
  exit()
if B-A<K:
  K=B-A
l=list()
for i in range(A,A+K):
  l.append(i)
for i in range(B-K+1,B+1):
  l.append(i)
l=set(l)
l=sorted(l)
for i in range(len(l)):
  print(l[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()
l=list()
for i in range(A,A+K):
  l.append(i)
for i in range(B-K+1,B+1):
  l.append(i)

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

Solution (Python):

A, B, K = map(int, input().split())
a = set(i for i in range(A, min(A + K, B + 1)))
b = set(j for j in range(max(B - K + 1, A), B + 1))
c = list(a | b)
c.sort()
for k in c:
    print(k)

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

a_l = [a+i for i in range(k)]
b_l = [b-i for i in range(k)]
if b-a < k:
    [print(i) for i in range(a,b+1)]
else:
    [print(i) for i in sorted(set(a_l+b_l))]

Solution (Python):
a, b, k = [int(x) for x in 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 ans in l:
    print(ans)

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

if b-a>200:
    for i in range(k):
        print(a+i)
    for i in range(k):
        print(b-k+1+i)
    
else:
    arr=[]
    for i in range(a,b+1):
        if i<a+k or i>b-k:
            arr.append(i)
    for i in range(len(arr)):
        print(arr[i])

Solution (Python):
a, b, k = [int(x) for x in input().split()]
if a + k - 1 < b - k + 1:
    ans_list = list(range(a, a + k)) + list(range(b - k + 1, b + 1))
else:
    ans_list = list(range(a, b + 1))
for ans in ans_list:
    print(ans)

Solution (Python):

import math


def inp():
    return(int(input()))



def inlist():
    return(list(map(int, input().split())))



def instr():
    s = input()
    return(list(s[:len(s)]))



def invr():
    return(map(int, input().split()))


A, B, K = invr()
r1 = []
r2 = []
k = K
for i in range(A, B+1):
    if k > 0:
        r1.append(i)
        print(i)
    else:
        break
    k -= 1
k = K
for i in range(B, A-1, -1):
    if k > 0:
        if i not in r1:
            r2.append(i)
    else:
        break
    k -= 1
r2 = sorted(r2)
for i in r2:
    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+K:
    ans.append(j)
ans.sort()
for k in ans:
  print(k)

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

Solution (Python):
import sys

input = sys.stdin.readline

def main():
    ans = ''
    n = '\n'
    A, B, K = map(int, input().split())
    AK = min(A+K, B)
    for i in range(A, AK):
        ans += str(i) + n
    BK = max(B-K+1, AK)
    for i in range(BK, B+1):
        ans += str(i) + n
    print(ans)

if __name__ == '__main__':
    main()

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 = list(map(int, input().split()))

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

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

ans = sorted(ans)

for a in ans:
    print(a)

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

def main(a,b,k):
    s = set(range(a,min(a+k,b+1)))
    s|=set(range(max(b-k+1,a),b+1))
    ans=sorted(list(s))
    return ans

if __name__=='__main__':
    a,b,k = readinput()
    ans=main(a,b,k)
    for _ in ans:
        print(_)

Solution (Python):






import sys
input = sys.stdin.readline

import math

import bisect
from collections import defaultdict
from collections import deque
from functools import lru_cache






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






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def Yes(): print("Yes"); return
def No(): print("No"); return


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr


def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors


def lcm(a, b):
    return a * b // gcd (a, b)


def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count


def Base_10_to_n(X, n):
  if (int(X/n)):
    return Base_10_to_n(int(X/n), n)+[X%n]
  return [X%n]






A,B,K = inputIL()
if B==1000000000:
  S1 = list(range(A,A+K))
  S2 = list(range(max(B+1-K,A+K),B+1))
  print(*S1,sep="\n")
  print(*S2,sep="\n")
  exit()
S = list(filter(lambda x: (A+K>x or B-K<x),list(range(A,B+1))))
print(*S,sep="\n")

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

for i in range(a,a+c):
  if i <= b:
    l.append(i)
for j in range(b,b-c,-1):
  if j >= a:
    l.append(j)
l = list(set(l))
l.sort()

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

Solution (Python):
a, b, k = list(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 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())
s = set()
for i in range(a, a+k):
    if a <=  i <= b:
        s.add(i)
for i in range(b-k+1, b+1):
    if a <=  i <= b:
        s.add(i)
for i in sorted(s):
    print(i)

Solution (Python):

import sys
input = sys.stdin.readline









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

s = set()

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

Ans = list(s)
Ans.sort()

for ans in Ans:
    print(ans)

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

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

s = list(set(s1+s2))
s.sort()

for i in s:
    print(i)

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

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

for a in ans:
	print(a)

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

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