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: Runtime Error

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

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

else:
    l1=[i for i in range(a,b+1)] 
    l2=[]
    for i in range(k):
        l2.append(l1[i])
    for i in range(b-a-k+1,b-a+1):
        l2.append(l1[i])

    l_set = list(set(l2))
    l_set.sort()
    for i in range(len(l_set)):
        print(l_set[i])

Submission status: Runtime Error

Solution code:
a,b,k=map(int, input().split())
if k>b:
    k=b-1

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

l_set = list(set(l2))
l_set.sort()
for i in range(len(l_set)):
    print(l_set[i])

Submission status: Runtime Error

Solution code:
a,b,k=map(int, input().split())
if k>b:
    k=b-1

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

l_set = list(set_l)
l_set.sort()
for i in range(len(l_set)):
    print(l_set[i])

Submission status: Runtime Error

Solution code:
a,b,k=map(int,input().split())
nums=list(range(a,b+1))
start=nums[:k]
end=nums[len(nums)-k:]
ans=start+end
for i in ans:
    print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def abc():
    a, b, c = map(int, input().split())
    n = list(range(a, b + 1))
    for s in sorted(set(n[:c]) | set(n[-c:])):
        print(s)


abc()

Submission status: Runtime Error

Solution code:
def abc():
    a, b, c = map(int, input().rstrip().split())
    n = list(range(a, b + 1))
    s = sorted(set(n[:c]) | set(n[-c:]))
    for _s in s:
        print(_s)


abc()

Submission status: Runtime Error

Solution code:
def abc():
    a, b, c = map(int, input().split())
    n = list(range(a, b + 1))
    s = sorted(set(n[:c]) | set(n[-c:]))
    for _s in s:
        print(_s)


abc()

Submission status: Runtime Error

Solution code:
def abc():
    a, b, c = map(int, input().split())
    n = list(range(a, b + 1))
    s = sorted(set(n[:c]) | set(n[-c:]))
    for _s in s:
        print(_s)


abc()

Submission status: Runtime Error

Solution code:
A,B,K=map(int,input().split())
a=list(range(A,B+1))
e=a[:K]
f=a[:-K-1:-1]
g=list(set(e+f))
g.sort()
for i in g :
  print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# coding: utf-8
import time
import re
import math

def main():
    A,B,K = map(int,input().split())
    ls=set([])
    for a in range(K):
        ls.append(A + a)
        ls.append(B - K +1+ a)
    ls.sort()
    for a in ls:
        print(a)
main()

Submission status: Runtime Error

Solution code:
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")

A, B, K = list(map(int, sys.stdin.readline().split()))

arr = list(range(A, B + 1))
a = list(range(A, min(B, A + K)))
b = list(range(max(A, B - K + 1), B + 1))



print('\n'.join(map(str, list(sorted(set(a + b))))))

Submission status: Runtime Error

Solution code:
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")

# N, M, X = list(map(int, sys.stdin.readline().split()))
# A = np.array(list(map(int, sys.stdin.readline().split())))
#
# print(min(len(A[A > X]), len(A[A<X])))

A, B, K = list(map(int, sys.stdin.readline().split()))

arr = list(range(A, B + 1))

print('\n'.join(map(str, list(sorted(set(arr[:K] + arr[-K:]))))))

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

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

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

aa = list(range(a, b+1))

bb = []

bb.append(aa[0:k])
bb.append(aa[len(aa)-k:])
bb = sum(bb,[])
bb = sorted(list(set(bb)))
for i in bb:
    print(i)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

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

aa = ''.join(map(str, (list(range(a, b+1)))))

cc = aa[0:k]
dd = aa[len(aa)-k:]

cc = [int(i) for i in cc]
dd = [int(i) for i in dd]

ee = set()

for i in cc+dd:
    ee.add(i)

ee = sorted(list(ee))

for i in ee:
    print(i)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

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

aa = list(range(a, b+1))

ans = set()
for i in range(len(aa)):
    if i <= k-1 or i >= len(aa)-k:
        ans.add(aa[i])

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

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

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

aa = list(range(a, b+1))

bb = []

bb.append(aa[0:k])
bb.append(aa[len(aa)-k:])
bb = sum(bb,[])
bb = sorted(list(set(bb)))
for i in bb:
    print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input().split())
x = list(range(a, b+1))

for i in sorted(set(x[:k]) | set(x[-k:])):
    print(i)

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input().split())
x = list(range(a, b+1))

for i in sorted(set(map(int, x[:k] + x[-k:]))):
    print(i)

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input().split())
x = list(range(a, b+1))

print('\n'.join(sorted(set(map(int, x[:k] + x[-k:])))))

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input().split())
x = list(range(a, b+1))

print('\n'.join(sorted(set(map(str, x[:k] + x[-k:])))))

Submission status: Runtime Error

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

X = list(range(A, B+1))

Submission status: Runtime Error

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

X = list(range(A, B+1))

o = set()
for i in X[:K]:
    print(i)
    o.add(i)

for i in X[-K:]:
    if i not in o:
        print(i)

Submission status: Runtime Error

Solution code:
A, B, K = [int(x) for x in input().split()]
X = list(range(A, B+1)))

o = set()
for i in X[:K]:
    print(i)
    o.add(i)

for i in X[-K:]:
    if i not in o:
        print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

X = sorted(range(A, B+1))
for i in sorted(set(X[:K]) | set(X[-K:])):
    print(i)

Submission status: Runtime Error

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

result = set()

for i in range(a,min(a+k,b+1)):
    result.add(i)
for j in arnge(max(a,b-k+1),b+1):
    result.add(j)

for k in sorted(list(result)):
    print(k)

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input().split())
x = list(range(a, b+1))

print('\n'.join(map(str, x[:k] + x[-k:])))

Submission status: Runtime Error

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: Runtime Error

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



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

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
#include<iostream>
using namespace std;

int main(){
  int A,B,K;
  cin >> A>>B>>K;
  set<int> l;
  for(int i=0;i<K;++i) if(A+i<=B) l.insert(A+i);
  for (int i=0;i<K;++i) if(B-i>=A) l.insert(B-i);
  for (auto x:l){
    cout << x <<endl;
  }

}

Submission status: Runtime Error

Solution code:
# 2019/05/22
# AtCoder Beginner Contest 093 - B

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

vals = list()
for i in range(a, b+1):
    vals.append(i)

vals.sort()
# small
for i in range(k):
    print(vals[i])

# large
for i in range(len(vals)-k, len(vals)):
    print(vals[i])

Submission status: Runtime Error

Solution code:
from sys import stdin
A,B,K=[int(x) for x in stdin.readline().rstrip().split()]
lst = list(range(A,B+1))
for i in sorted(set(lst[:K]+lst[-K:])):
    print(i)

Submission status: Runtime Error

Solution code:
from sys import stdin
A,B,K=[int(x) for x in stdin.readline().rstrip().split()]
lst = list(range(A,B+1))
for i in sorted(list(set(lst[:K]+lst[-K:]))):
    print(i)

Submission status: Runtime Error

Solution code:
from sys import stdin
A,B,K=[int(x) for x in stdin.readline().rstrip().split()]
lst = list(range(A,B+1))
for i in sorted(list(set([:K]+[-K:]))):
    print(i)

Submission status: Runtime Error

Solution code:
from sys import stdin
A,B,K=[int(x) for x in stdin.readline().rstrip().split()]
lst = list(range(A,B+1))
for i in lst[:K]:
    print(i)
for j in lst[-K:]:
    print(j)

Submission status: Runtime Error

Solution code:
A,B,K = map(int,input().split())
lists = list(range(A,B+1))
ans = []
for i in range(K):
    if i < len(lists):
        ans.append(lists[i])
        ans.append(lists[(len(lists)-1)-i])
    else:
        break
m = set(ans)
lm = sorted(m)
for j in range(len(lm)):
    print(lm[j])

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline

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

arr = sorted([i for i in range(a, b+1)])
arr_slice = set(arr[:k] | arr[-k:])
[print(i) for i in sorted(arr_slice)]

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
import math

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

Submission status: Runtime Error

Solution code:
import sys
import math

a,b,k = list(map(int, input().split()))
lis = range(a,a+k) + range(b-k+1, b+1)
for i in range(len(lis)):
    print(lis[i])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
A, B, K = map(int, input().split())
box = list(range(A, B+1))
if 2*K < len(box):
    box.sort()
    for i in box:
        print(i)
    sys.exit()
if A == B:
    if K >= 1:
        print(A)
        sys.exit()
    else:
        print()
        sys.exit()
box.sort()
temp1 = box[:K] + box[-K:]
temp = sorted(set(temp1), key=temp1.index)
temp.sort()
for i in temp:
    print(i)

Submission status: Runtime Error

Solution code:
import sys
A, B, K = map(int, input().split())
box = list(range(A, B+1))
if K >= 2*len(box):
    box.sort()
    for i in box:
        print(i)
    sys.exit()
if A == B:
    if K >= 1:
        print(A)
        sys.exit()
    else:
        print()
        sys.exit()
box.sort()
temp1 = box[:K] + box[-K:]
temp = sorted(set(temp1), key=temp1.index)
temp.sort()
for i in temp:
    print(i)

Submission status: Runtime Error

Solution code:
import sys
A, B, K = map(int, input().split())
box = list(range(A, B+1))
if K >= 2*len(box):
    box.sort()
    for i in box:
        print(i)
    sys.exit()
box.sort()
temp1 = box[:K] + box[-K:]
temp = sorted(set(temp1), key=temp1.index)
temp.sort()
for i in temp:
    print(i)

Submission status: Runtime Error

Solution code:
import sys
A, B, K = map(int, input().split())
box = list(range(A, B+1))
if K >= 2*len(box):
    box.sort()
    print(box)
    sys.exit()
box.sort()
res = set()
for i in range(K):
    res.add(box[i])
box.reverse()
for i in range(K):
    res.add(box[i])
res = list(res)
res.sort()
print(res)

Submission status: Runtime Error

Solution code:
A, B, K = map(int, input().split())
box = list(range(A, B+1))
if K >= B - A:
    K = B - A
box.sort()
res = set()
for i in range(K):
    res.add(box[i])
box.reverse()
for i in range(K):
    res.add(box[i])
res = list(res)
res.sort()
print(res)

Submission status: Runtime Error

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

ans = {i for i in range(a,a+k)}
ans2 = {i for i in range(b,b-k,-1)}

ans.add(ans2)
ans = sorted(list(ans))

for an in ans: print(an)

Submission status: Runtime Error

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

L = list(range(A,B+1))
L = sorted(list(set(L[:K])|set(L[-K:])))
print(*L, sep='\n')

Submission status: Runtime Error

Solution code:
a,b,k = map(int,input().split())
li = []
if k >= b - a:
    print([x for x in range(a,b+1)])
else:
    for i in range(k):
        li.append(a + i)
    for i in range(k):
        li.append(b - i)
    for i in sorted(li):#sorted()で昇順にできる
     　 print(i)

Submission status: Runtime Error

Solution code:
A, B, K = map(int, input().split())
L = list(range(A, B + 1))
if len(L) - 2 <= 2 * K:
    for l in L:
        print(l)
else:
    ans = []
    for i in range(K):
        ans.append(L[i])
        ans.append(L[-i - 1])
    for a in sorted(ans):
        print(a)

Submission status: Runtime Error

Solution code:
A, B, K = map(int, input().split())
L = list(range(A, B + 1))
if len(L) <= 2 * K:
    for l in L:
        print(l)
else:
    ans = []
    for i in range(K):
        ans.append(L[i])
        ans.append(L[-i - 1])
    for a in sorted(ans):
        print(a)

Submission status: Runtime Error

Solution code:
A, B, K = map(int, input().split())
L = list(range(A, B + 1))
if len(L) <= 2 * K:
    for l in L:
        print(l)
else:
    ans = []
    for i in range(K):
        ans.append(L[i])
        ans.append(L[-i])
    for a in ans:
        print(a)

Submission status: Runtime Error

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

for j in range(B - k + 1, B + 1):
    L.append(i)

L = sorted(L, reverse=True)

for l in L:
    print(l)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B,K = map(int,input().split())
lists = list(range(A,B+1))
min_list = []
max_list = []
if K > len(lists):
        for m in range(len(lists)):
                print(lists[m])
else:
        for i in range(K):
                min_list.append(lists[i])
        for j in range(K,len(lists)):
                min_list.append(lists[j])
        for k in range(len(min_list)):
                print(min_list[k])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for s in sorted(set(res)):
    print(s)

Submission status: Runtime Error

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

ans = list(range(a, a+k)) + list(range(b-k, b))
ans2 = [i for i in ans if a<=i<=b and i not in ans2]

for j in ans2:
    print(j)

Submission status: Runtime Error

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

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

for n in ans.sort():
    print(n)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B,K = map(int,input().split())
ansnums = [A+k for k in K]
ansnums.extend([B-k for k in K])
ansnums = sorted(set(ansnums))
for i in ansnums:
    print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B,K=(int(i) for i in input().split())
L=list(range(A,B+1))
a=B-A+1
if K>a:
  for i in L:
    print(i)
else:
  S=list(set(L[:K]+L[a-K:a]))
  S.sort()
  for i in S:
    print(i)

Submission status: Runtime Error

Solution code:
A,B,K=(int(i) for i in input().split())
L=list(range(A,B+1))
a=B-A+1
if K>=a:
  for i in L:
    print(i)
else:
  S=list(set(L[:K]+L[a-K:a]))
  S.sort()
  for i in S:
    print(i)

Submission status: Runtime Error

Solution code:
A,B,K=(int(i) for i in input().split())
L=list(range(A,B+1))
a=B-A+1
if K>=a:
  for i in range(a):
    print(L[i])
else:
  S=list(set(L[:K]+L[a-K:a]))
  S.sort()
  for i in S:
    print(i)

Submission status: Runtime Error

Solution code:
A,B,K=(int(i) for i in input().split())
L=list(range(A,B+1))
a=B-A+1
if K>=a:
  for i in range(a):
    print(L[i])
else:
  S=list(set(L[:K]+L[a-K:a]))
  S.sort()
  for i in range(len(S)):
    print(S[i])

Submission status: Runtime Error

Solution code:
A,B,K=(int(i) for i in input().split())
L=list(range(A,B+1))
a=B-A+1
if K>=a:
  for i in range(a):
    print(L[i])
else:
  S=list(set(L[:K])&set(L[a-K:a]))[:]
  for i in range(len(S)):
    print(S[i])

Submission status: Runtime Error

Solution code:
# https://atcoder.jp/contests/abc093/tasks/abc093_b
a, b, k = [int(x) for x in input().split()]
r = list(range(a, b + 1))
for v in sorted(set(r[:k] + r[-k:])):
    print(v)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,k=map(int,input().split());*r,=range(a,b+1)
for t in sorted(set(r[:k]+r[-k:])):print(t)

Submission status: Runtime Error

Solution code:
a,b,k=map(int,input().split());*r,=range(a,b+1);print(*sorted(set(r[:k]+r[-k:])),sep='\n')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
2 10 3

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    A,B,K = map(int, lines.pop(0).split(' '))
    NLIST = list(range(A,B+1))
    res = list(set(NLIST[:K] +  NLIST[-K:]))
    res.sort()
    for i in res:
        print(i)

#
# main
#
lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    A,B,K = map(int, lines.pop(0).split(' '))
    NLIST = list(range(A,B+1))
    res = list(set(NLIST[:K] +  NLIST[-K:]))
    for i in res:
        print(i)

#
# main
#
lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,k = map(int,input().split())
c = list(range(a,b+1))

if 2*k <= len(c):
    ans = c[:k] + c[-k:]
else:
    ans = c

for i in ans:
    print(i)

Submission status: Runtime Error

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

l = list(range(a, b + 1))
ans = []
ans.extend(l[:min(k,len(l))])
ans.extend(l[max(0,len(l) - k):])

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

Submission status: Runtime Error

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

l = list(range(a, b + 1))
ans = []
ans.extend(l[:min(b,k)])
ans.extend(l[max(len(l) - k,a):])

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

Submission status: Runtime Error

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

l = list(range(a, b + 1))
ans = []
ans.extend(l[:k])
ans.extend(l[len(l) - k:])

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

Submission status: Runtime Error

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

l = list(range(a, b + 1))
ans = []
ans.extend(l[:k])
ans.extend(l[len(l) - k:])

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

Submission status: Runtime Error

Solution code:
int_a, int_b, int_k = map(int, input().split())

ar = list(range(int_a, int_b + 1))

minset = set(range(int_a, int_a + int_k))
maxset = set(range(int_b - int_k + 1, int_b + 1))

result = list(minset | maxset)
result.sort()
for i in result:
    if int_a <= i <= int_b:
        print(i)

Submission status: Runtime Error

Solution code:
int_a, int_b, int_k = map(int, input().split())

ar = list(range(int_a, int_b + 1))

minset = set(range(int_a, int_a + int_k + 1))
maxset = set(range(int_b - int_k + 1, int_b + 1))

result = list(minset | maxset)
result.sort()
for i in result:
    if int_a <= i <= int_b:
        print(i)

Submission status: Runtime Error

Solution code:
int_a, int_b, int_k = map(int, input().split())

ar = list(range(int_a, int_b + 1))

minset = set(ar[:int_k])
maxset = set(ar[int_k * -1:])

result = list(minset | maxset)
result.sort()
for i in result:
    print(i)

Submission status: Runtime Error

Solution code:
int_a, int_b, int_k = map(int, input().split())

ar = list(range(int_a, int_b + 1))

minset = set(ar[:int_k])
maxset = set(ar[int_k * -1:])

result = list(minset | maxset)
result.sort()
print(result)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B,K = map(int,input().split())
for i in range(A,B+1): #AからB
    if i < A+K || B-K < i :
        print(i)

Submission status: Runtime Error

Solution code:
A, B, N = [int(x) for x in input().split()]
array = list(range(A, B+1))

array = list(filter(lambda x: B-(N-1) <= x or x <= A+(N-1), array))

print('\n'.join([str(x) for x in array]))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,k=map(int,input().split())
l=list(range(a,b+1))
m=sorted(l,reverse=True)
n=[]
for i in range(k):
  if i+1<=len(l):
    n.append(l[i])
    n.append(m[i])
  else:
    break
n=sorted(list(set(n)))
for i in n:
  print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
iter_list = list(range(a,a+k+1)) + list(range(b-k, b+1))
cand = sorted(list(set(iter_list)))
for i in cand:
    if a <= i and i <= b:
        print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
d=[]
for i in range(a,b+1):
	d.append(i)
#print(d)
e=[]
if c<b:
	for i in range(c):
		e.append(d[i])
		e.append(d[-i-1])
else:
	for i in d:
		print(i)


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

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
d=[]
for i in range(a,b+1):
	d.append(i)
#print(d)
e=[]
if c<b:
	for i in range(c):
		e.append(d[i])
		e.append(d[-i-1])
else:
	for i in d:
		print(i)
e.sort()
e=set(e)
for i in e:
	print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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