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:
def Small_and_Large(a , b , k):

    ans = []

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

    return ans

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
data = input().split()

a,b,c = int(data[0]), int(data[1]), int(data[2])

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

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

Submission status: Wrong Answer

Solution code:
data = input().split()

a,b,c = int(data[0]), int(data[1]), int(data[2])

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
import string


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


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]

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

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
l =[]
m =[]
for i in range(a, b + 1):
    l.append(i)
#print(l)
f = l[:k]
b = l[len(l) - k:]
for j in f:
    m.append(j)
for k in b:
    m.append(k)
m_new = set(m)
for t in m_new:
    print(t)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k=list(map(int,input().split()))
l=[]
v=[]
for i in range(a,b+1):
    l.append(i)
for i in range(k):
    if i>=len(l):
        break
    v.append(l[i])
l.reverse()
for i in range(k-1,-1,-1):
    if i>=len(l):
        continue
    v.append(l[i])
s=set(v)
for i in s:
    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)
s=sorted(s)
for x in s:
    print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# Author: cr4zjh0bp
# Created: Thu Mar 12 19:09:40 UTC 2020
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

A, B, K = na()

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

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

Submission status: Wrong Answer

Solution code:
# Author: cr4zjh0bp
# Created: Thu Mar 12 19:09:40 UTC 2020
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

A, B, K = na()

if abs(A - 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)

Submission status: Wrong Answer

Solution code:
A,B,C=map(int,input().split())
L=[]
for i in range (C):
	L.append(A+i)
	L.append(B-i)
X=sorted(L)
for i in range (len(X)):
	print(X[i])

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if (B-A)<=0.5*K+1:
    for i in range(A,B+1):
        print(i)
else:
    _list=[]
    for i in range(K):
        _list.append(A+i)
        _list.append(B-i)
    _list.sort()
    for i in _list:
        print(i)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A,B,K = map(int,input().split())
n = 0
ans = []
for i in range(K):
  n = i
  if A+i <= B:
    ans.append(A+i)
  else:    
    break
for j in range(K-1,-1,-1):
  if B-j > A+n:
    ans.append(B-j)
ans.sort()

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

x = [i for i in range(a, b+1)]
for i in set(x[:k] + list(reversed(list(reversed(x))[:k]))):
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

ans=list(set(ans))
print(*ans, sep='\n')

Submission status: Wrong Answer

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

ans=list(set(ans))
print(*ans, sep='\n')

Submission status: Wrong Answer

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

if K <= (B-A+1)/2:
  print(*( list(range(A,K+1)) + list(range(B-K+1,B+1)) ),sep="\n")
else:
  print(*list(range(A,B+1)),sep="\n")

Submission status: Wrong Answer

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

nums=[i for i in range(A,B+1)]

if K < len(nums):
  print(*(nums[:K] + nums[-K:]),sep="\n")
else:
  print(*nums,sep="\n")

Submission status: Wrong Answer

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

hako = {}
for i in range(A, A + K):
    if i < B:
        hako[i] = 0
for j in range(B, B - K, -1):
    if j > A:
        hako[j] = 0

for k in sorted(hako):
    print(k)


# for i in range(A, B+1):
#     hako.append(i)
# new = []
# new += hako[0:K]
# new += hako[B - K + 1::-1]

Submission status: Wrong Answer

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

for x in range(K):
    if B >= A+x or B-x >= A:
        X.append(str(A+x))
        X.append(str(B-x))

sortX = sorted(set(X))
# print(" ".join(sortX))
for x in sortX:
    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 i in range(max(a+k, b-k+1), b+1):
  print(i)

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
ans_dic={}
A_K = A+K if A+K <= B else B
for i in range(A, A_K):
    ans_dic[i] = 1
K_B = B-K if B-K >= A else A
for i in range(B, K_B, -1):
    if i in ans_dic:
        pass
    else:
        ans_dic[i] = 1
for i, v in sorted(ans_dic.items()):
    print(i)

Submission status: Wrong Answer

Solution code:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    a, b, k = list(map(int, readline().split()))
    res = []
    for i in range(a, min(a + k, b + 1)):
        res.append(i)
    for i in range(b, max(b - k, a - 1), -1):
        if i not in res:
            res.append(i)
    print(sorted(res))


if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:
a,b,x = map(int, input().split())
l = list()
for i in range(x):
    if a <= a+i <= b:
        l.append(a+i)
    if a <= b+i <= b:
        l.append(b-i)
l = set(sorted(l))
for i in l:
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
ans = set([])
for _ in range(k):
    ans.add(a)
    a += 1
    ans.add(b)
    b -= 1
ans = list(ans)
ans.sort()
print("\n".join(list(map(str, ans))))

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
ans = []
for _ in range(k):
    ans.append(a)
    a += 1
    ans.append(b)
    b -= 1
ans.sort()
print("\n".join(list(map(str, ans))))

Submission status: Wrong Answer

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

numbers = set() 
for i in range(A, A+K):
    if i <= B:
        numbers.add(i)
    
for j in range(B-K, B):
    if j >= A:
        numbers.add(j+1)
    
for n in numbers:
    print(n)

Submission status: Wrong Answer

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

x = list(set(x))
print(*sorted(x), sep='\n')

Submission status: Wrong Answer

Solution code:
a,b,k = map(int, input().split())
l = []
for i in range(b-a+1):
    l.append(a+i)
#print(l)
c = len(l)
d = min(c,k)
x = []
for j in range(d):
    x.append(l[j])
    x.append(l[-(j+1)])
print(*list(set(x)),sep='\n')

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

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

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

for j in range(len(ans)):
    if j  < k:
        print(ans[j])

for y in range(-k, 0):
    print(ans[y])

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)
    
l=set(ans)
ans2=list(l)
ans2.sort()

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

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):
        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())
L=set([i for i in range(a,min(a+k,b))]+[i for i in range(max(b-k+1,a),b+1)])
for a in L:
    print(a)

Submission status: Wrong Answer

Solution code:
#Small and Large Integers
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)

S = set(L)
L = list(S)
for i in range(len(L)):
    print(L[i])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

wk1 = list(range(a, min(a+k, b)))
wk2 = list(range(max(b-k+1, a), b+1))

for c in set(wk1 + wk2):
    print(c)

Submission status: Wrong Answer

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

wk1 = list(range(a, min(a+k, b)))
wk2 = list(range(max(b-k+1, a), b+1))

for c in (wk1 + wk2):
    print(c)

Submission status: Wrong Answer

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

l = [i for i in range(a, b+1)]

if b - a < k:
    for i in l:
        print(i)
else:
    for i in l[:k]:
        print(i)
    for i in l[-k:]:
        print(i)

Submission status: Wrong Answer

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

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

for i in l:
  print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

    output = dict()

    for i in range(k):
        if a<= a+i <= b:
            output[a+i] = a+i
    
    for i in range(-k+1,1):
        if a<= b+i <= b:
            output[b+i] = b+i
    
    for o in output.keys():
        print(o)

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    a, b, k = map(int, input().split())

    output = dict()

    for i in range(k):
        if a<= a+i <= b:
            output[a+i] = a+i
    
    for i in range(-k+1,1):
        if a<= a+i <= b:
            output[b+i] = b+i
    
    for o in output.keys():
        print(o)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

listed = []

for n in range(K):
    sousa = n
    print(A+sousa)

for n in range(K):
    sousa = n
    listed.append(B-sousa)
    listed.sort(reverse = False)

for n in range(len(listed)):
    print(listed[n])

Submission status: Wrong Answer

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

if len(ans) // 2 <= k:
  for i in ans:
    print(i)
else:
  for i in ans[:k]:
    print(i)
  for i in ans[-k:]:
    print(i)

Submission status: Wrong Answer

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

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

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

for i in ans:
    print(i)

Submission status: Wrong Answer

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

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

for i in l[len(l)-k:]:
    if not(i in ans):
        ans.append(i)

for i in ans:
    print(i)

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
s = set(range(a, min(b + 1, a + k)))
s |= set(range(b, max(a - 1, b - k)))
s = sorted(s)
print('\n'.join(map(str, s)))

Submission status: Wrong Answer

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b,c=INTM()
    abl=b-a+1
    ablist=[i for i in range(a,b+1)]
    #print(ablist)
    ansa=ablist[0:min(c,abl)]
    ansb=ablist[max(0,abl-c):abl]
    #print(ansa,ansb)
    ans=set(ansa) | set(ansb)
    for i in ans:
        print(i)
if __name__ == '__main__':
    do()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
a=[]
b=[]
for i in range(A, A+K):
    a.append(i)
for i in range(B-K+1, B+1):
    b.append(i)
c=sorted(set(a)|set(b))
for i in c:
    print(i)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

a,b,k=map(int,input().split())
list=[]
if (b-a)<=k*2:
	for l in range(b-a+1):
		print(l+a)
	sys.exit()
for i in range(a,a+k):
	list.append(i)
for j in range(b,b-k,-1):
	list.append(j)
list.sort()
for k in range(len(list)):
	print(list[k])

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

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:
"""
author : halo2halo
date : 24, Jan, 2020
"""

import sys

# import itertools
# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

A, B, K = map(int, readline().split())
ans=''
if B - A <= 2 * K:
    ans += '\n'.join(str(x) for x in range(A, B + 1))
else:
    ans += '\n'.join(str(x) for x in range(A, A + K))
    ans+='\n'
    ans += '\n'.join(str(x) for x in range(B + 1 - K, B + 1))
print(ans)

Submission status: Wrong Answer

Solution code:
from itertools import chain

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

if K > diff:
    K = diff

ans = [x for x in chain(range(A, A + K), range(B - K + 1, B + 1))]
ans = sorted(list(set(ans)))

print('\n'.join(map(str, ans)))

Submission status: Wrong Answer

Solution code:
from itertools import chain

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

if K >= diff:
    K = diff - 1

ans = [x for x in chain(range(A, A + K), range(B - K + 1, B + 1))]
ans = sorted(list(set(ans)))

print('\n'.join(map(str, ans)))

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

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

Submission status: Wrong Answer

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

l = range(A, B+1)
a = [n for n in l[:K]]
b = [n for n in l[-K:]]

for n in set(a + b):
    print(n)

Submission status: Wrong Answer

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

l = range(A, B+1)
for n in l[:K]:
    print(n)
for n in l[-K:]:
    print(n)

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
for x in range(A, A+K):
  if x<=B: print(x)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

else:
  nList = []
  for i in range(k):
    nList.append(a+i)
    nList.append(b-i)
    print(sorted(nList))

Submission status: Wrong Answer

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

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

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

x=[]
for i in range(a,min(b+1,a+k)):
  x.append(i)
for i in range(max(a,b-k+1),b+1):
  x.append(i)

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

Submission status: Wrong Answer

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

for i in range(A,B + 1):
    lst.append(i)


sorted_lst = sorted(lst, reverse=True)

ans = 0
anslis = []

for i in lst:
    ans = ans + 1
    if ans <= K:
        anslis.append(i)

ans2 = 0
for j in sorted_lst:
    ans2 = ans2 + 1
    if ans2 <= K:
        anslis.append(j)
        

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

Submission status: Wrong Answer

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

h = int((a+b)/2)
c1 = [x for x in range(a, h)]
c2 = [x for x in range(h, b+1)]
for i in range(0, k):
   try:
      print(c1[i])
   except:
      break
for i in reversed(range(1, k+1)):
   try:
      print(c2[-i])
   except:
      pass

Submission status: Wrong Answer

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

A = (set(range(A, A+K)) | set(range(B-K+1, B+1)))

[print(i) for i in sorted(A)]

Submission status: Wrong Answer

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

A = sorted([i for i in range(A, B+1)])
small = A[:K]
large = A[-K:]
print(*small, sep="\n")
print(*large, sep="\n")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

t = set()
for i in range(a, min(a + k,b)):
    t.add(i)

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

l = sorted(list(t))

for i in l:
    print(i)

Submission status: Wrong Answer

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

t = set()
for i in range(a, min(a + k,b)):
    t.add(i)

for i in range(b, max(b - k - 1,a), -1):
    t.add(i)

l = sorted(list(t))

for i in l:
    print(i)

Submission status: Wrong Answer

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

t = set()
for i in range(a, min(a + k,b)):
    t.add(i)

for i in range(b, max(b - k,a), -1):
    t.add(i)

l = sorted(list(t))

for i in l:
    print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input().split()
i=int(s[0])
j=int(s[1])
k=int(s[2])
a=[]
for l in range(k):
  if i+l<=j:
    a.append(str(i+l))
  else:
    break
b=int(a[-1])
if b>=j-k and b<j:
  for l in range(1,i-b+1):
    if b+l<=j:
      a.append(str(b+l))
elif b<j-k:
  for l in range(k-1,-1,-1):
    if j-l<=j:
      a.append(str(j-l))
print(*a)

Submission status: Wrong Answer

Solution code:
s=input().split()
i=int(s[0])
j=int(s[1])
k=int(s[2])
a=[]
for l in range(k):
  if i+l<=j:
    a.append(str(i+l))
  else:
    break
b=int(a[-1])
if b>=i-k and b<i:
  for l in range(1,i-b+1):
    if b+l<=j:
      a.append(str(b+l))
elif b<i-k:
  for l in range(k-1,-1,-1):
    if j-l<=j:
      a.append(str(j-l))
print(*a)