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

output_list = []
output=[]

for i in range(K):
    output_list.append(A+i)
    output_list.append(B-K+i+1)

for num in output_list:
    if A <= num <= B:
        output.append(num)
    else:
        continue
output_set = set(output)
output_list = list(output_set)
output_list.sort()

for num in output_list:
    print(num)

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

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

Solution (Python):
A,B,K=map(int,input().strip().split(" "))
c=[]

if(A==B and K>=1):
    print(A)
    quit()
elif(A==B and K==0):
    quit()

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

else:

    if(K>B):
        K=B

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


    if(B-K<=0):
        quit()


    for i in range(B-K+1,B+1):
        if(i not in c and i<=B and i>=A):
            print(i)

Solution (Python):
A, B, K = map(int, input().split())
s = set()
for i in range(K):
    s |= {A + i, B - i}
for x in sorted(s):
    if A <= x <= B:
        print(x)

Solution (Python):



def main():
    """Function."""
    a, b, k = map(int, input().split())

    check = set()
    for i in range(k):
        temp = a + i
        if temp > b:
            pass
        else:
            check.add(temp)
    for i in range(k):
        temp = b - k + i + 1
        if temp < a:
            pass
        else:
            check.add(temp)

    uniq = list(check)
    uniq.sort()
    for i in uniq:
        print(i)


if __name__ == "__main__":
    main()

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

first = [i for i in range(A, B+1)] if A + K >= B else [i for i in range(A, A+K)]
latter = [i for i in range(B-K+1, B+1)] if B - K >= A else [i for i in range(A, B+1)]

for i in sorted(list(set(first + latter))):
    print(i)

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

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

for i in range(X):
    if(B-X+i+1 not in ANS):
        if(B-X+i+1>=A):
            ANS.append(B-X+i+1)

for j in ANS:
    print(j)

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

Solution (Python):
def main():
    a, b, k = map(int, input().split())
    s1 = set(range(a, min(a + k, b + 1)))
    s2 = set(range(max(b - k + 1, a), b + 1))
    for c in sorted(s1 | s2):
        print(c)


if __name__ == '__main__':
    main()

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

counter = 1
ans_list = []
for i in range(A,B+1) :
	ans_list.append(i)
	counter += 1
	if (counter > K) :
		break

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

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

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

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

i = 0
tmp = A
while i < K and tmp <= B:
    ans.add(tmp)
    tmp += 1
    i += 1

i = 0
tmp = B
while i < K and A <= tmp:
    ans.add(tmp)
    tmp -= 1
    i += 1

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

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

res = set()

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

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



for i in sorted(list(res)):
    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)
for i in range(k):
    if not b-k+i+1 in l and a<=b-k+i+1:
        l.append(b-k+1+i)
l.sort()
for x in l:
    print(x)

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

Solution (Python):
a,b,c = map(int,input().split())
ar = []
if a + c > b:
    d = b+1
else:
    d = a+c
for i in range(a,d):
    ar.append(i)
if b - c < a:
    e = a
else:
    e = b-c+1
for i in range(e,b+1):
    ar.append(i)
br = set(ar)
cr = sorted(br)
for i in cr:
    print(i)

Solution (Python):

a, b, k = map(int, input().split())
s = {a, b}
for i in range(k):
    if a+i <= b:
        s.add(a+i)
    if b-i >= a:
        s.add(b-i)
s = sorted(s)
for i in s:
    print(i)

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

if b-a+1>2*c:
	x=[i for i in range(a,a+c)]
	y=[i for i in range(b-c+1,b+1)]
	e=x+y
else:
	e=[i for i in range(a,b+1)]

for i in e:
	print(i)

Solution (Python):
a,b,k = input().split()
a=int(a)
b=int(b)
k=int(k)
if a==b:
  print(a)
if b-a < k:
  k=b-a
x=[i for i in range(a,a+k)]
y=[i for i in range(b,b-k,-1)]
z=x+y
z.sort()
z=set(z)
z=list(z)
z.sort()
for i in range(len(z)):
    print(z[i])

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

n = A
while n <= B:
    print(n)
    n += 1
    if n >= A + K:
        n = max(n, B - K + 1)

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

n = A
while n < A + K and n <= B:
    print(n)
    n += 1

n = max(n, B - K + 1)

while n <= B:
    print(n)
    n += 1

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

nums = set(
    [n for n in range(A, min(A + K, B + 1))] +
    [n for n in range(max(B - K + 1, A), B + 1)]
)

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

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

    i = a
    while True:
        if i > b:
            return
        if i-a + 1 > k:
            i = max(i, b-k+1)
            break
        print(i)
        i += 1
    while True:
        if i > b:
            break
        print(i)
        i += 1

if __name__ == "__main__":
    main()

Solution (Python):
A, B, K = [int(_) for _ in input().split()]
if 2*K <= B-A:
    print("\n".join([str(_) for _ in list(range(A,A+K)) + list(range(B-K+1,B+1))]))
else:
    print("\n".join([str(_) for _ in list(range(A,B+1))]))

Solution (Python):
A, B, K = map(int, input().split())
center = (A + B) // 2

max_limit = A + K - 1
min_limit = B - K + 1

end_n = center if center <= max_limit else max_limit
for i in range(A, end_n + 1):
    print(i)
        
begin_n = center + 1 if center + 1 >= min_limit else min_limit
for i in range(begin_n, B + 1):
    print(i)

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

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())
if a+k>=b:
	for i in range(a,b+1):
		print(i)
	exit()
x=[i for i in range(a,a+k)]
y=[i for i in range(b-k+1,b+1)]
z=list(set(x+y))
z.sort()
for i in z:
	print(i)

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

a = l[0]
b = l[1]
k = l[2]

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

Solution (Python):
a,b,k=map(int,input().split())
i=0
while(a+i <= a+k-1 and a+i<=b):
  print(a+i)
  i+=1

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

Solution (Python):
a,b,k = map(int, input().split())
c = b - a + 1
if c % 2 == 0:
  if k >= c / 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)
if c % 2 != 0:
  if k >= (c + 1)/ 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):
a, b, k = [int(i) for i in input().split()]
if k >= b-a+1:
  for i in range(a, b+1):
    print(i)
else:
  c = [i for i in range(a, a+k)]
  d = [i for i in range(b-(k-1), b+1)]
  e = sorted(list(set(c) | set(d)))
  for i in e:
    print(i)

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

    for i in range(a, a+k):
        s.add(i)

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

    for i in sorted(s):
        if a <= i and i <= b:
            print(i)

if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5)
 
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())
 
a,b,k = li()
ans = set()
for i in range(k):
    if a+i > b:
        break
    
    ans.add(a+i)
    
for i in range(k):
    if b-i < a:
        break
    
    ans.add(b-i)
    
ansl = sorted(list(ans))
 
for ans in ansl:
    print(ans)

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

Solution (Python):
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

a,b,k = li()
ans = set()
for i in range(k):
    if a+i > b:
        break
    
    ans.add(a+i)
    
for i in range(k):
    if b-i < a:
        break
    
    ans.add(b-i)
    
ansl = sorted(list(ans))

for ans in ansl:
    print(ans)

Solution (Python):
A,B,K = map(int,input().split())
ans = set()
for a in range(A,A+K):
    if a > B: break
    ans.add(a)
for a in range(B,B-K,-1):
    if a < A: break
    ans.add(a)
for a in sorted(ans):
    print(a)

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

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

Solution (Python):
from sys import stdin


def main() -> None:
    a, b, k = [int(next_str()) for _ in range(3)]

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

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


def next_str() -> str:
    result = ""
    while True:
        tmp = stdin.read(1)
        if tmp.strip() != "":
            result += tmp
        elif tmp != '\r':
            break
    return result


if __name__ == '__main__':
    main()

Solution (Python):


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

Solution (Python):
a,b,k=map(int,input().split())
s={a}
for i in range(a,a+k):
    if a<=i<=b:
        s.add(i)
for i in range(b,b-k,-1):
    if a<=i<=b:
        s.add(i)
s=list(s)
s.sort(reverse=True)
for i in range(len(s)):
    print(s.pop())

Solution (Python):
a,b,c=map(int,input().split())
l=set()
for i in range(a,a+c):
    if i!=b:l.add(i)
    else:break
for i in range(max(b-c+1,a),b+1):
        l.add(i)
print("\n".join(map(str,sorted(list(l)))))

Solution (Python):
"""
B - Small and Large Integers
"""

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

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

for i in range(b - k + 1, b + 1):
    if a <= i and i <= b:
        if i not in numbers:
            numbers.append(i)
    else:
        break

for i in numbers:
    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 > B:
        break
    S.add(i)
for i in range(B-K+1, B+1):
    if i < A:
        break
    S.add(i)
for i in sorted(S):
    print(i)

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

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

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

Solution (Python):
a, b, k = list(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)
for a in sorted(list(ans)):
    print(a)

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

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

if a + k > b - 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 + i + 1)

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

Solution (Python):
a,b,k = map(int,input().split())
l = range(a,b+1)

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 = [int(m) for m in input().split(" ")]

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

Solution (Python):
A,B,K = map(int, input().split())
X = range(A,B+1)

for _ in sorted(set(X[:K]) | set(X[-K:])):
  print(_)

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

if 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(max(a+k,b-k+1),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:
    for a in range(A, A+K):
        if a > B:
            break
        print(a)

    for b in range(B-K+1, B+1):
        print(b)

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

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

S = (set(Z))
for i in sorted(S):
    print(i)

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

s=[]

for i in range(k):
	if a+i not in s and a-1<a+i<b+1:	
		s.append(a+i)
for j in range(k) :
	if b-k+j+1 not in s and a-1<b-k+j+1<b+1:
		s.append(b-k+j+1)
for l in range(len(s)):
	print(s[l])

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

ans = []

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


ans = set(ans)

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

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

    for i in range(len(c)):
        print(c[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):
    if A + i <= B and A <= B - i:
        ans.append(A + i)
        ans.append(B - i)

ans = set(ans)

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

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


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

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

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

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

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

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

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

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

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

Solution (Python):
a,b,k = map(int, input().split())
count = 0
while count < k:
    if a+count <= b:
        print(a+count)
    count += 1
count = 0
while count < k:
    if b-k+1+count >= a+k:
        print(b - k + 1 + count)
    count += 1

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

Solution (Python):

import math


def main():
    a, b, k = [int(a) for a in input().split()]

    aaa = []

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

    for a in aaa:
        print(a)


if __name__ == '__main__':
    main()

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

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

lower_list = [i for i in range(a, a + k)]
upper_list = [i for i in range(b, b - k, -1)]

out_list = sorted(set(lower_list + upper_list))
for out in out_list:
    if a <= out <= b:
        print(out)

Solution (Python):
a, b, c = map(int, input().split())
cnt = 0
for i in range(a, a+c):
    if i <= b:
        print(i)
    cnt = i
for i in range(b-c+1, b+1):
    if i > cnt and i >= a:
        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)
        ans.append(b - i)
    else:
        break
a = sorted(list(set(ans)))
for i in range(len(a)):
    print(a[i])

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

lower_list = [i for i in range(a, a + k)]
upper_list = [i for i in range(b, b - k, -1)]
out_list = sorted(set(lower_list + upper_list))

for out_val in out_list:
    if a <= out_val <= b:
        print(out_val)

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

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

Solution (Python):




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


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


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


ans_set = set(lis)


ans_list = list(ans_set)


ans_list.sort()


for n in ans_list:
        print(n)

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

num = B-A+1
lis = []


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


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


ans_set = set(lis)

ans_list = list(ans_set)
ans_list.sort()

for n in ans_list:
        print(n)

Solution (Python):
A, B, K = map(int, input().split())
ans = list(set(range(A, min(B, A+K))) | set(range(max(A, B-K+1), B+1)))
ans.sort()
print(' '.join(map(str, ans)))

Solution (Python):
A, B, K = map(int, input().split())
ans = list(set(range(A, A+K)) | set(range(B-K+1, B+1)))
ans.sort()
for i in ans:
	if A <= i <= B:
		print(i)

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

x = []

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

for i in range(B - K + 1, B + 1):
    if (i >= A):
        x.append(i)

y = set(x)

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

Solution (Python):
a, b, k = map(int, input().split())
listN=range(a,b+1)
index=0
if k>len(listN):
    for number in listN:
        print(number)
else:
    listForP=[]
    index1=0
    while index<k:
        print(listN[index])
        listForP.append(listN[index])
        index+=1
    index2=len(listN)-k
    while index2<len(listN):
        if listN[index2] not in listForP:
            print(listN[index2])
        index2+=1

Solution (Python):



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


A, B, K = inpl()

c = A
while c < A + K and c <= B:
  print(c)
  c += 1

if c <= B - K:
  c = B - K + 1
  
while c > B - K and c <= B:
  print(c)
  c += 1

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

if __name__ == "__main__":
    main()

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

if __name__ == "__main__":
    main()

Solution (Python):
a, b, k = map(int, raw_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):
        if i >= 1:
            print(i)

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

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

Solution (Python):
a,b,k=map(int,input().split())
c=set()
for i in range(a,a+k):
    if i <a or i>b:
        continue
    c.add(i)
for j in range(b-k+1,b+1):
    if j <a or j>b:
        continue
    c.add(j)
c=sorted(list(c))
print("\n".join(map(str,c)))

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 = (int(i) for i in input().split())

ans = []

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

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

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

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

R = [A, B]

for k in range(1, K):
    if A + k >= B:
        break
    R.append(A + k)

for k in range(1, K):
    if B - k <= A:
        break
    R.append(B - k)


R = list(set(R))
R.sort()

for r in R:
    print(r)

Solution (Python):
A,B,K = map(int,input().split())
L = []
for i in range(K) :
    a = A+i
    b = B-i
    if a <= B :
        L.append(a)
    if b >= A :
        L.append(b)
L = list(set(L))
ANSWER = sorted(L)
for j in range(len(ANSWER)) :
    print(ANSWER[j])

Solution (Python):

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

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

a_upper = min(b, a+k-1)
b_lower = max(a, b-k+1)

u = set(range(a, a_upper+1))
v = set(range(b_lower, b+1))

for i in sorted(list(u | v)):
    print(i)

Solution (Python):

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

Solution (Python):
A, B, K = map(int, input().split())
for i, num in enumerate(range(A, B + 1)):
    if i + 1 > K:
        break
    print(num)
x = []
for i, num in enumerate(range(B, A-1, -1)):
    if i + 1 > K:
        break
    x.append(num)
x.sort()
k = B - A +1

for i in x:
    if k < 2 * K:
        k += 1
    else:
        print(i)

Solution (Python):
A, B, K = map(int, input().split())
if B - A <= 100:
    s = [0 for i in range(B - A + 1)]
    if K > len(s):
        K = len(s)
    
    for i in range(K):
        s[i] = 1
        s[B - A - i] = 1
 
    for i in range(B - A + 1):
        if s[i] == 1:
            print(i + A)

else:
    ss = [0 for i in range(100)]
    sb = [0 for i in range(100)]

    for i in range(K):
        print(i + A)

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

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 j>i:
    print(j)

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

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

for i in range(0, K):
    if A + i <= B:
        X.append(A + i)
for i in range(K-1, -1, -1):
    if B-i in X:
        continue
    else:
        if B - i >= A:
            X.append(B - i)
for i in range(len(X)):
    print(X[i])

Solution (Python):


from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


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


if __name__ == '__main__':
    main()

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

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

l = B - A + 1

if l == 1:
  print(A)
elif l == 2:
  print(A)
  print(B)
else:
  if (l+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())

if b-a+1 <= 2*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):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(10000)




def chkprint(*args):
    names = {id(v): k for k, v in inspect.currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg), '???')+' = '+repr(arg) for arg in args))




def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]




dp = None


def main():
    A, B, K = li_input()

    C = []

    for i in range(A, min(A + K, B+1)):
        C.append(i)

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

    for c in C:
        print(c)


main()

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

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):
    if i not in ans:
        ans.append(i)
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):
a,b,k=map(int,input().split())
c=set()
for i in range(min(k,b-a+1)):
    c.add(i+a)
for i in range(min(k,b-a+1)):
    c.add(b-i)
c=sorted(c)
c=list(map(int,c))
for i in c:
    print(i)

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