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



Sample input:
3 8 2


Sample output:
3
4
7
8

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
arr1 = [x for x in range(a, min(a+k, b))]
arr2 = [x for x in range(b, max(b-k, a), -1)]
arr = sorted(set(arr1 + arr2))
print(*arr, sep="\n")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
L = []
if A+K+1 >= B-K+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)

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
L = []
if A+K+1 >= B-K+1:
    for i in range(A, B+1):
        print(i)
        exit()
for i in range(A, A+K):
    L.append(i)
for j in range(B-K+1, B+1):
    L.append(j)
list(set(L)).sort()
for k in L:
    print(k)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
num = [i for i in range(A, B+1)]
num1 = num[:K]

num.sort(reverse=True)

num2 = num[:K]
num2.sort()

num = num1 + num2
num = list(set(num))

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

Submission status: Wrong Answer

Solution code:
A,B,K= map(int, input().split())
ans = [i for i in range(A,min(A+K,B))] + [i for i in range(B,max(B-K,A),-1)] 
[print(num) for num in sorted(list(set(ans)))]

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
c = []
for i in range(k):
    if a+i <= b:
        c.append(str(a+i))
    if b-i >= a:
        c.append(str(b-i))
print("\n".join(sorted(set(c))))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

for ans in sorted(list(s)):
    print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
K = min(K, B - A + 1)
print(*list(set([i for i in range(A, A+K)] + [i for i in range(B-K+1, B+1)])), sep='\n')

Submission status: Wrong Answer

Solution code:
a,b,k = map(int, input().split())
s={ i for i in range(a,a+k)}
t={ j for j in range(b-k+1,b+1)}
u=sorted(s|t)
for num in u:
  print(num)

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
if B - A <= 2 * K:
    print(*range(A, B + 1), sep="\n")
else:
    print(*range(A, A + K), sep="\n")
    print(*range(B - K + 1,  B + 1), sep="\n")

Submission status: Wrong Answer

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

ans = set()

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

ans = list(ans)
ans.sort()

for ele in ans:
    print(ele)

Submission status: Wrong Answer

Solution code:
a,b,k = map(int, input().split())
l = [i for i in range(a,b+1)]
l = l[:k] + l[-k:]
for i in l:
    print(i)

Submission status: Wrong Answer

Solution code:


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


    if a+k > b:
        c = b
    else:
        c = a+k

    for i in range(a,c):
        ansSet.add(i)
    
    if b-k < a:
        c = a
    else:
        c = b-k

    for i in range(b,c,-1):
        ansSet.add(i)

    for i in sorted(list(ansSet)):
        print(i)


if __name__== "__main__":
    main()

Submission status: Wrong Answer

Solution code:


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


    if a+k > b:
        c = b
    else:
        c = a+k

    for i in range(a,c):
        ansSet.add(i)
    
    if b-k < a:
        c = a
    else:
        c = b-k

    for i in range(b,c,-1):
        ansSet.add(i)

    print(sorted(list(ansSet)))


if __name__== "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
ret = []
for i in range(k):
    ret.append(a + i)
for i in range(b - k + 1, b + 1):
    ret.append(i)
for i in ret:
    print(i)

Submission status: Wrong Answer

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

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

ans=[]
for i in range(a,a+k):
    ans.append(i)

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

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

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
s = set(range(a,a+k))
t = set(range(b-k+1,b+1))
u = (s|t)&set(range(a,b+1))
print(*u,sep="\n")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,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 j in range(b-k+1,b+1):
    print(j)

Submission status: Wrong Answer

Solution code:
import sys
from statistics import *
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

a, b, k = na()
ct = 0
li = []
for i in range(a, a + k):
    if i <= b:
        li.append(i)
for i in range(b - k + 1, b+1):
    if i >= a:
        li.append(i)
print(*list(set(li)))

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
arr = range(A, B + 1)
ans = []
for i in range(K):
    ans.append(A + i)
for j in range(K):
    ans.append(B + 1 - K + j)

anset = list(set(ans))
if A+K<=B+1:
    for ele in range(len(anset)):
        print(anset[ele])
else:
    for ele in range(A,B+1):
        print(ele)

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
arr = range(A, B + 1)
ans = []
for i in range(K):
    ans.append(A + i)
for j in range(K):
    ans.append(B + 1 - K + j)

anset = list(set(ans))
for ele in range(len(anset)):
    print(anset[ele])

Submission status: Wrong Answer

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    a, b, k = list(map(int, input().rstrip('\n').split()))
    ls = []
    for i in range(a, min(a + k, b)):
        ls.append(i)
    for i in range(b, max(b - k, a - 1), -1):
        ls.append(i)
    ls.sort()
    import collections
    ls = collections.Counter(ls)
    for k, v in ls.items():
        print(k)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
L = [i for i in range(a,b+1)]
rL = sorted(L, reverse=True)
if k >= b-a+1:
  for i in L:
    print(i)
else:    
  for i in range(k):
    print(L[i])
  for i in range(k):
    print(rL[i])

Submission status: Wrong Answer

Solution code:
a, b, k = map(int,input().split())
ab = []
ans = set()

for i in range(a,b+1):
    ab.append(i)

if b-a > k:
    for m in range(k):
        ans.add(ab[m])
    for n in ab[-k:b]:
        ans.add(n)
else:
    for j in ab:
        ans.add(j)
    
print(*ans, sep='\n')

Submission status: Wrong Answer

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

for i in range(a,b+1):
    ab.append(i)

if b-a > k:
    for m in range(k):
        print(ab[m])
    for n in ab[-k:b]:
        print(n)
else:
    for j in ab:
        print(j)

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
ans = set()
for i in range(a,a+k):
    if i <= b:
        ans.add(i)
for i in range(b-k+1,b+1):
    if i >= a:
        ans.add(i)
ans = list(ans)
for i in range(len(ans)):
    print(ans[i])

Submission status: Wrong Answer

Solution code:
A,B,K = map(int, input().split())
ans = []
if A + K < B - K:
    ans = [A + i for i in range(K)] + [B - i for i in reversed(range(K))]

else:
    if A + K - 1 < B and A <= B - K + 1:
        ans = [A + i for i in range(K)] + [B - i for i in reversed(range(B - (A + K - 1)))]
    else:
        ans = [i for i in range(A,B+1)]

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

Submission status: Wrong Answer

Solution code:
A,B,K = map(int, input().split())
ans = []
if A + K < B - K:
    ans = [A + i for i in range(K)] + [B - i for i in reversed(range(K))]

else:
    if A+K <+ B and A <= B - K:
        ans = [A + i for i in range(K)] + [B - i for i in reversed(range(B - (A + K) + 1))]
    else:
        ans = [i for i in range(A,B+1)]

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

Submission status: Wrong Answer

Solution code:
a,b,x=map(int,input().split())
print(*sorted(set(range(a,a+x))|set(range(b-x+1,b+1))),sep='\n')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,K = map(int,input().split())
s = []
ans = []
ans_2 = []
ans_3 = []
for i in range(A,B+1):
    s.append(i)
if K>A-B:
    for i in range(A,B+1):
        print(i)
else:
    for i in range(K):
        ans.append(s[i])
    for i in range(K):
        ans_2.append(s[-(i+1)])
    ans_2.sort()
    for i in range(len(ans)):
      ans_3.append(ans[i])
    for i in range(len(ans_2)):
      ans_3.append(ans_2[i])
    for i in range(len(ans_3)-1):
        if ans_3.count(ans_3[i]) != 1:
            ans_3.remove(ans_3[i])
    for i in range(len(ans_3)):
      print(ans_3[i])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in set:
    print(i)

Submission status: Wrong Answer

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

for i in set:
    print(i)

Submission status: Wrong Answer

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

for i in range(k):
    if a + i > b - i:
        break
    ans.append(a + i)
    ans.append(b - i)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k=map(int,input().split())
li1 = range(a,a+k)
li2 = range(b-k+1,b+1)
se1=set(li1)
se2=set(li2)
se=sorted(se1|se2)
for i in se:
    print(i)

Submission status: Wrong Answer

Solution code:
A, B, K = [int(x) for x in input().split()]
if K >= (B - A) / 2:
  l = [i for i in range(A, B + 1)]
else:
  l = [i for i in range(A, A + K)]
  l += [i for i in range(B - K + 1, B + 1)]

for i in l:
  print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
num = [i for i in range(a, b+1)]
if b - a <= k * 2:
    for n in num:
        print(n)
else:
    for i in range(0, k):
        print(num[i])
    for i in range(-k, 0):
        print(num[i])

Submission status: Wrong Answer

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

a = set(str(i) for i in range(A, A+K))
b = set(str(i) for i in range(B-K+1, B+1))
for i in sorted(list(a | b)):
  print (i)

Submission status: Wrong Answer

Solution code:
A,B,K=map(int,input().split())
if K==1:
    print(A)
    print(B)
else:
    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-1:
            print(i)

Submission status: Wrong Answer

Solution code:
a,b,x = map(int,input().split())
a_set = set(range(a,min(a+x,b)))
b_set = set(range(max(a,b-x+1),b+1))

print(a_set)
print(b_set)

a_set = a_set.union(b_set)
ans_list = list(a_set)
ans_list.sort()
for ans in ans_list:
  print(ans)

Submission status: Wrong Answer

Solution code:
a,b,x = map(int,input().split())
a_set = set(range(a,min(a+x,b)))
b_set = set(range(max(a,b-x),b+1))

a_set = a_set.union(b_set)
for ans in a_set:
  print(ans)

Submission status: Wrong Answer

Solution code:
a,b,x = map(int,input().split())
a_set = set(range(a,a+x))
b_set = set(range(b-x,b+1))
answer = a_set.intersection(b_set)
for ans in answer:
  print(ans)

Submission status: Wrong Answer

Solution code:
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),B+1):
    print(i)

Submission status: Wrong Answer

Solution code:
A,B,K=map(int, input().split())
result = set(list(range(A,B+1)[:K]) + list(range(A,B+1)[-K:]))
print(list(result))

Submission status: Wrong Answer

Solution code:
A,B,K=map(int, input().split())
result = set(list(range(A,B+1)[:K]) + list(range(A,B+1)[-K:]))
print(result[i] for i in range(len(result)))

Submission status: Wrong Answer

Solution code:
A,B,K=map(int,input().split())
print(set(list(range(A,B+1)[:K]) + list(range(A,B+1)[-K:])))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
ls = []
ls2 = []
ls3 = []
ans = []
for i in range(a,b+1):
    ls.append(i)
    
if len(ls) < k:
    for i in ls:
        print(i)
else:
    for i in range(k):
        ans.append(ls[i])
        ls2.append(i+1)

    for i in range(1,len(ls2)+1):
        ls3.append(ls2[-i])

    for i in range(len(ls3)):
        ans.append(ls[-ls3[i]])

if k % 2 == 1:
    ans.remove(ans[round(len(ans)/2)])

for i in ans:
    print(i)

Submission status: Wrong Answer

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

if A + K > B:
    i = B
else:
    i = A + K

if B - K < A:
    j = A
else:
    j = B - K

first = set(range(A, i))
second = set(range(B, j, -1))
l = sorted(list(first | second))

print(*l, sep='\n')

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
aa = [i for i in range(a,a+k+1) if i <= b]
bb = [i for i in range(b-k+1,b+1) if i >= a]
c = list(sorted(set(aa+bb)))
for i in c:
  print(i)

Submission status: Wrong Answer

Solution code:
a=list(map(int,input().split()))
b=[]
for i in range(a[2]):
    if a[0]+i<a[1]:
        b.append(a[0]+i)
    if a[1]-i>a[0]:
        b.append(a[1]-i)
b=sorted(set(b))
for i in b:
    print(i)

Submission status: Wrong Answer

Solution code:
a=list(map(int,input().split()))
b=[]
for i in range(a[2]):
    b.append(a[0]+i)
    b.append(a[1]-i)
b=set(b)
for i in b:
    print(i,end=' ')

Submission status: Wrong Answer

Solution code:
a=list(map(int,input().split()))
b=[]
for i in range(a[2]):
    b.append(a[0]+i)
    b.append(a[1]-i)
b=sorted(b)
for i in b:
    print(i,end=' ')

Submission status: Wrong Answer

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

L = []
for i in range(K):
    x = A+i
    y = B-i
    if x not in L:
        L.append(x)
    if y not in L:
        L.append(y)
L.sort()

for x in L:
    print(x)

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
l = []
for i in range(k):
    l.append(a+i)
for i in range(k-1,-1,-1):
    l.append(b-i)
l.sort()
for i in range(len(l)):
    print(l[i])

Submission status: Wrong Answer

Solution code:
a=list(map(int,input().split()))
b=[]
for i in range(a[2]):
    b.append(a[0]+i)
    b.append(a[1]-i)
b=sorted(b)
print(b)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
ans = []
for i in range(k):
  ans.append(a+i)
  ans.append(b-i)
ans.sort()
last = 'null'
for i in range(len(ans)):
  if ans[i] != last:
    print(ans[i])
  last = ans[i]

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
ans = []
for i in range(a, min(a + k, b)):
    if i not in ans:
        ans.append(i)
for i in range(b, max(b - 2, a - 1), -1):
    if i not in ans:
        ans.append(i)
ans.sort()
for i in range(len(ans)):
    print(ans[i])

Submission status: Wrong Answer

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

ans=list(set(list(i for i in range(a,a+k+1,1) if i<=b)+list(j for j in range(b,b-k-1,-1) if j>=a)))

for l in ans:
    print(l)

Submission status: Wrong Answer

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

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

for i in reversed(range(B,B-K,-1)):
    if A < i:
        ans.append(i)

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

Submission status: Wrong Answer

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


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

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

Submission status: Wrong Answer

Solution code:
A, B, K = list(map(int,input().split(' ')))
'''
x = [i for i in range(A,B+1)]
s_f,s_b = x[:K],x[len(x)-K:]
ans = s_f + s_b
ans =list(set(ans))
#ans.sort()

'''
if len(range(A,B+1))<100:
  [print(i) for i in range(A,B+1)]
else:
  x = [i for i in range(A,B+1)]
  s_f,s_b = x[:K],x[len(x)-K:]
  ans = s_f + s_b
  ans =list(set(ans))
  ans.sort()
  [print(i) for i in ans]

Submission status: Wrong Answer

Solution code:
A, B, K = list(map(int,input().split(' ')))
'''
x = [i for i in range(A,B+1)]
s_f,s_b = x[:K],x[len(x)-K:]
ans = s_f + s_b
ans =list(set(ans))
#ans.sort()

'''
if len(range(A,B+1))<100:
  [print(i) for i in range(A,B+1)]
else:
  s_f = [i for i in range(A,A+K)]
  s_b = [i for i in range(B-K+1,B+1)]
  ans = s_f + s_b
  ans =list(set(ans))
  ans.sort()
  [print(i) for i in ans]

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
X = [x for x in range(A, B+1)]
res = set(X[:K] + X[-K:])
for x in res:
    print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k=map(int,input().split())
l=set([])
for i in range(k):
  l.add(a);l.add(b)
  a+=1;b-=1
m=sorted(l)
for x in m:print(x)

Submission status: Wrong Answer

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

num=[i for i in range(a,b+1)]
for i in set(num[:k]+num[::-1][:k]):
    print(i)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b,k = list(map(int,input().split()))
l = [i for i in range(a,a+k) if a<= i and b>=i]+[i for i in range(b, b-k, -1) if a<= i and b>=i]
ll = set(sorted(l))

for i in ll:
    print(i)

Submission status: Wrong Answer

Solution code:
a,b,k = list(map(int,input().split()))
l = [i for i in range(a,a+k)]+[i for i in range(b, b-k, -1)]
ll = set(sorted(l))

for i in ll:
    print(i)

Submission status: Wrong Answer

Solution code:
a,b,k = list(map(int,input().split()))
l = [i for i in range(a,a+k)]+[i for i in range(b, b-k, -1)]
ll = sorted(l)

for i in ll:
    print(i)

Submission status: Wrong Answer

Solution code:
a,b,k = list(map(int,input().split()))
l = [i for i in range(b+1) if i>=a]
ansl = l[:k]+l[-k:]
for j in set(ansl):
    print(j)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
# ABC93, B - small and large integers
a, b, k = map(int, input().split(' '))


if k >= (b-a+1)/2:
    [print(x) for x in range(a, b+1)]
else:
    [print(x) for x in range(a, a+k)]
    [print(x) for x in range(b-k, b)]

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
if A >= 1000:
    for i in range(A, A + K):
        print(i)
    for k in range(B - K + 1, B + 1):
        print(k)
else:
    for i in range(A, B + 1):
        if A <= i < A + K or B - K < i <= B:
            print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
num = []
for i in range(k):
    num.append(a+i)
for i in range(k-1,-1,-1):
    if (b - i) in num:
        pass
    else:
        num.append(b - i)
for i in num:
    print(i)

Submission status: Wrong Answer

Solution code:
import math

#x = int(input())
#a = int(input())
a,b,k = list(map(int,input().split(" ")))
#ls = list(input().split(" "))
#ls = list(map(int,input().split(" ")))
#a,b,c = list(input().split())
#string = input()
#ls = [int(input()) for i in range(n)]

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

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

Submission status: Wrong Answer

Solution code:
import math

#x = int(input())
#a = int(input())
a,b,k = list(map(int,input().split(" ")))
#ls = list(input().split(" "))
#ls = list(map(int,input().split(" ")))
#a,b,c = list(input().split())
#string = input()
#ls = [int(input()) for i in range(n)]

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

Submission status: Wrong Answer

Solution code:
A,B,K = map(int,input().split())
S=set()
for i in range(K):
  S.add(A+i)
  S.add(B-i)
print("\n".join(str(x) for x in sorted(list(S))))

Submission status: Wrong Answer

Solution code:

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

low = [a + i for i in range(0, k)]
high = [b - i for i in range(0, k)]
res = set(low + high)

res = filter(lambda s: a <= s <= b, res)

for x in res:
    print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
for num in (A, B+1):
  if num <= A+K-1 or num >= A-K+1:
    print(num)

Submission status: Wrong Answer

Solution code:
A,B,K=map(int,input().split())
li=[]  
for i in range(A,A+K):
  li.append(i)
for j in range(B-K,B+1):
  li.append(j)
ans=sorted(set(li))
for l in ans:
  if A<=l<=B:
    print(l)

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
s1 = set(range(a,a+k))
s2 = set(range(b,b-k,-1))
s0 = list(s2 | s1)
s0.sort()
[print(s0[i]) for i in range(len(s0))]

Submission status: Wrong Answer

Solution code:
import sys

#+++++


def main():
	a, b, k = map(int, input().split())
	if a+k < b-k:
		ff=range(a,b+1)[:k]
		bb=range(a,b+1)[-k:]
		ret=list(ff)+list(bb)
	else:
		ret=range(a,b+1)
	for i in ret:
		print(i)
		
#+++++

if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
	else:
		input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
c = [0] * (2*k)
for i in range(k):
  c[i] = a + i
for i in range(k):
  c[2*k-1-i] = b - i
for i in set(c):
  print(i)

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
d = {}
for i in range(a, a+c):
    d[i] = 1
    if i == b:
        break
for i in range(b, b-c, -1):
    d[i] = 1
    if i == b:
        break
d = sorted(d.items())
for i, j in d:
    print(i)

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
l1 = min(b, a + k)
r1 = max(a, b - k)
if l1 <= r1:
    l = [x for x in range(a, l1)]
    r = [x for x in range(b, r1, -1)]
    r = r[::-1]
    lr = l + r
else:
    lr = [x for x in range(a, b + 1)]
for x in lr:
    print(x)

Submission status: Wrong Answer

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

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

for i in range(k):
  print(a+i)

for j in range(k):
  print(b-j)

Submission status: Wrong Answer

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

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

ans = set()

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

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

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
l1 = min(b, a + k)
r1 = max(a, b - k)
if l1 <= r1:
    l = [x for x in range(a, l1)]
    r = [x for x in range(b, r1, -1)]
    r = r[::-1]
    lr = l + r
else:
    lr = [x for x in range(a, b + 1)]
c = 0
for x in lr:
    if c != x:
        c = x
        print(c)

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
l1 = min(b, a + k)
r1 = max(a, b - k)
if l1 < r1:
    l = [x for x in range(a, l1)]
    r = [x for x in range(b, r1, -1)]
    r = r[::-1]
    lr = l + r
else:
    lr = [x for x in range(a, b + 1)]
c = 0
for x in lr:
    if c != x:
        c = x
        print(c)

Submission status: Wrong Answer

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