CodeEff/ECCO huggingface dataset:
# Original solution
from itertools import combinations
n = int(eval(input()))
As = list(map(int, input().split()))
Bs = list(map(int, input().split()))

even = []   #偶数番目で表になる
odd = []    #奇数番目で表になる
for i,(a,b) in enumerate(zip(As,Bs)):
    if i%2 == 0:
        even.append(a)
        odd.append(b)
    else:
        even.append(b)
        odd.append(a)



def check(n, even, odd):
    prev = -10**10
    ps = []
    for i in range(n):
        if i%2 == 0:
            if prev > even[i//2][0]:
                return False,-1
            else:
                ps.append(even[i//2][1])
            prev = even[i//2][0]
        else:
            if prev > odd[i//2][0]:
                return  False, -1
            else:
                ps.append(odd[i//2][1])
            prev = odd[i//2][0]
    return True, ps
    


def inversion(a):
    n = len(a)
    cnt = 0
    for i in range(n):
        for j in range(i+1,n):
            if a[i] > a[j]:
                cnt +=1
    return cnt
 
#偶数としてpickupするやつ
INF = 10**10
ans = 10**10
for l in combinations(list(range(n)), (n-1)//2+1):
    cnt = 0
    even_selected = [(even[i],i) for i in range(n) if i in l]
    odd_selected = [(odd[i],i) for i in range(n) if i not in l]
    # こいつらを昇順に並べられるか
    even_selected.sort()
    odd_selected.sort()
    is_possible, a = check(n, even_selected, odd_selected)
    # 並び順が正しければ
    if is_possible:
        cnt = inversion(a)
        ans = min(cnt, ans)
        
if ans == INF:
    print((-1))
else:
    print(ans)        

# Optimized solution
n = int(eval(input()))
As = list(map(int, input().split()))
Bs = list(map(int, input().split()))

INF = 1<<20

dp = [[INF] * 55 for i in range(1<<n)]
dp[0][0] = 0

for b in range(1<<n):
    # 使ったカードの枚数
    bitcnt = bin(b).count("1")
    cur = bitcnt 
    rest = [] 
    for i in range(n):
        # i番目のbitが立っているかの判定
        if not (b & (1 << i)):
            rest.append((i,cur))
            cur += 1
    
    for s in range(51):
        if dp[b][s] >= INF:
            continue
        # 残ったカードで更新
        for i,cur in rest:
            if abs(bitcnt - i) % 2 == 0:
                num = As[i]
            else:
                num = Bs[i]
            if num >= s:
                d = abs(bitcnt - cur) 
                dp[b|(1<<i)][num] = min(dp[b|(1<<i)][num], dp[b][s] + d)
            

ans = min(dp[(1<<n)-1])
print((ans if ans != INF else -1))
# Original solution
n = int(eval(input()))
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]


class BIT:
    def __init__(self, a, func=int.__add__, one=0):
        self.n = len(a)
        self.func = func
        self.one = one
        self.a = [0] * (self.n + 1)

        for i, j in enumerate(a):
            self.update(i, j)

    def update(self, i, x):
        i += 1
        while i <= self.n:
            self.a[i] = self.func(self.a[i], x)
            i += i & (-i)

    def get(self, i):
        i += 1
        s = self.one
        while i != 0:
            s = self.func(s, self.a[i])
            i -= i & (-i)
        return s


ans = 10 ** 18
for i in range(1 << n):
    c = []
    for j in range(n):
        if i >> j & 1 == 0:
            c.append(a[j])
        else:
            c.append(b[j])
    d = sorted(c)

    ind = {}
    for j, k in enumerate(d):
        if (j % 2, k) not in ind:
            ind[(j % 2, k)] = j

    e = []
    ok = True
    for j, k in enumerate(c):
        j = ((i >> j & 1) + j) % 2
        if (j, k) not in ind:
            ok = False
            break
        l = ind[(j, k)]
        if l >= n or d[l] != k:
            ok = False
            break
        e.append(l)
        ind[(j, k)] += 2

    if ok:
        count = 0
        bit = BIT([0] * (n+1))
        for j in e:
            count += bit.get(n - j)
            bit.update(n-j, 1)
        ans = min(ans, count)
if ans == 10 ** 18:
    print((-1))
else:
    print(ans)


# Optimized solution
n = int(eval(input()))
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]

ans = 10 ** 18
for i in range(1 << n):
    c = []
    for j in range(n):
        if i >> j & 1 == 0:
            c.append(a[j])
        else:
            c.append(b[j])
    d = sorted(c)

    ind = {}
    for j, k in enumerate(d):
        if (j % 2, k) not in ind:
            ind[(j % 2, k)] = j

    e = []
    ok = True
    for j, k in enumerate(c):
        j = ((i >> j & 1) + j) % 2
        if (j, k) not in ind:
            ok = False
            break
        l = ind[(j, k)]
        if l >= n or d[l] != k:
            ok = False
            break
        e.append(l)
        ind[(j, k)] += 2

    if ok:
        count = 0
        for k in range(n):
            for j in range(n - 1 - k):
                if e[j] > e[j + 1]:
                    count += 1
                    e[j], e[j + 1] = e[j + 1], e[j]
        ans = min(ans, count)
if ans == 10 ** 18:
    print((-1))
else:
    print(ans)
# Original solution
from collections import deque

N=int(eval(input()))
A=list(map(int,input().split()))
B=list(map(int,input().split()))

def judge(L):
    for i in range(N-1):
        if L[i]>L[i+1]:
            return False
    return True

def swap(LA,LB,i):
    LA[i],LB[i+1]=LB[i+1],LA[i]
    LA[i+1],LB[i]=LB[i],LA[i+1]

def hash(LA,LB):
    v=0
    for a in LA:
        v+=a
        v*=51
    for b in LB:
        v+=b
        v*=51
    return v

if judge(A):
    print((0))
    exit()

Q=deque()
for i in range(N-1):
    Q.append((0,i,A[:],B[:]))
ans=0
V=set()
while Q:
    d,i,LA,LB=Q.popleft()
    if i>18:
        print((-1))
        exit()
    swap(LA,LB,i)
    h=hash(LA,LB)
    if h in V:
        continue
    if judge(LA):
        print((d+1))
        exit()
    V.add(h)
    for i in range(N-1):
        Q.append((d+1,i,LA[:],LB[:]))
print((-1))
exit()


# Optimized solution
N=int(eval(input()))
A=list(map(int,input().split()))
B=list(map(int,input().split()))

#0-indexed

#カードiが左からjの位置にあるときの表の数字
def getNum(i,j):
    return B[i] if abs(i-j)&1 else A[i]

#dp[使用済みカードを表すbit列][いちばん右のカードNo]=最小操作回数
INF=10**9
dp=[[INF for _ in range(N)] for __ in range(1<<N)]
for i in range(N):
    dp[1<<i][i] = i

for m in range(1,1<<N): #配置済みカードパターン
    cnt=bin(m).count('1') #配置済みカード数
    idx=dict() #未配置カードの位置
    tmp=cnt
    for i in range(N):
        if m & (1<<i) == 0:
            idx[i]=tmp
            tmp+=1
    for j in range(N): #新たに並べるカード
        if m & (1<<j):
            #もう使ったやつです
            continue
        num_j=getNum(j,cnt)
        for i in range(N): #配置済みのいちばん右にあるカード
            if m & (1<<i) == 0:
                #まだ配置済みじゃないです
                continue
            num_i=getNum(i,cnt-1)
            if num_i>num_j:
                #単調増加になりません
                continue
            dp[m|(1<<j)][j] = min(dp[m|(1<<j)][j], dp[m][i] + idx[j]-cnt)

ans=INF
for i in range(N):
    ans=min(ans,dp[(1<<N)-1][i])
print((ans if ans<INF else -1))
# Original solution
s = input()

n = len(s)
K = 0
s_i1=""
size=1

while len(s.strip(s[0]))>0 or len(s)>2:
    s_i=s[0:size]

    if s_i1 == s_i:
        size = size + 1
    else:
        s_i1=s_i
        s = s[size:]
        size = 1
        K = K + 1

print(K+1)


# Optimized solution
s = input()

n = len(s)
K = 0
s_i1=""
size=1

#while len(s.strip(s[0]))>0 or len(s)>2:
while len(s)>2:
    s_i=s[0:size]

    if s_i1 == s_i:
        size = size + 1
    else:
        s_i1=s_i
        s = s[size:]
        size = 1
        K = K + 1
if not s_i1==s[0]:
    if len(s.strip(s[0]))>0:
        K=K+1
K=K+1
print(K)
# Original solution
a,b,k=list(map(int,input().split()))
num=[i for i in range(a,b+1)]
ans=[]
ans.extend(num[:k])
ans.extend(num[-k:])
ans=sorted(list(set(ans)))
for ansi in ans:
    print(ansi)

# Optimized solution
a,b,k=list(map(int,input().split()))
ans=[i for i in range(a,min(b,a+k))]
ans.extend([i for i in range(max(a,b-k+1),b+1)])
ans=sorted(list(set(ans)))
for ansi in ans:
    print(ansi)
# Original solution
A,B,K = list(map(int,input().split()))

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


if 2 * K >= len(s):
    for j in range(len(s)):
        print((s[j]))

    exit()

l = [s[i] for i in range(0,K)]
k = [s[h] for h in range(len(s) - K, len(s))]

for a in range(len(l)):
    print((l[a]))
for b in range(len(k)):
    print((k[b]))

#for t in range(0,K):
#    print(s[t])

# s.reverse()

#for h in range(len(s) - K,len(s)):
#    print(s[h])



# Optimized solution
A,B,K = list(map(int,input().split()))

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


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

    exit()

#l = [s[i] for i in range(0,K)]
#k = [s[h] for h in range(len(s) - K, len(s))]

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

#for t in range(0,K):
#    print(s[t])

# s.reverse()

#for h in range(len(s) - K,len(s)):
#    print(s[h])
# Original solution
A,B,K=map(int,input().split())
tmp = set(range(A,B+1)) & (set(range(A,A+K)) | set(range(B-K+1,B+1)))
[print(s) for s in sorted(tmp)]


# Optimized solution
A,B,K=map(int,input().split())
tmp = set(range(A,min(B+1,A+K))) | set(range(max(A, B-K+1),B+1))
[print(s) for s in sorted(tmp)]
# Original solution
a,b,k = list(map(int, input().split()))
for i in range(a,b+1):
    if i<a+k or b-k<i:
        print(i)

# Optimized solution
a,b,k = list(map(int, input().split()))
for i in range(a,min(a+k,b+1)):
    print(i)
    p=i
for i in range(max(p+1,b-k+1),b+1):
    print(i)
# Original solution
a,b,k = list(map(int,input().split()))

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

# Optimized solution
a,b,k = list(map(int,input().split()))

if b-a < 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-k+1+i))
# Original solution
# ABC93, B - small and large integers
a, b, k = map(int, input().split(' '))

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

if k >= len(X)/2:
    [print(x) for x in X]
else:
    for i in range(k):
        print(X[i])
    for i in range(k, 0, -1):
        print(X[len(X)-i])


# Optimized solution
# 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+1, b+1)]
# Original solution
a,b,k=list(map(int,input().split()));k-=1
for i in range(a,b+1):
  if i<=a+k or b-k<=i:print(i)

# Optimized solution
a,b,k=list(map(int,input().split()))
for i in range(k):
  if a+i<=b:print((a+i))
for i in range(k):
  if a+k<=b-k+1+i:print((b-k+1+i))
# Original solution
a, b, k = list(map(int, input().split()))
if a + 2 * k > 1 + b:
    for i in range(a, b + 1):
        print(i)
else:
    for i in range(a, a + k):
        print(i)
    for i in range(b - k + 1, b + 1):
        print(i)

# Optimized solution
a, b, k = list(map(int, input().split()))
for i in sorted(list(set(range(a, min(a + k, b + 1))) | set(range(max(a, b - k + 1), b + 1)))):
    print(i)
# Original solution
A, B, K = list(map(int, input().split()))
l = [int(x) for x in range(A, B + 1)]
if 2 * K > B - A + 1:
	for i in l:
		print(i)
else:
	for i in range(A, A + K):
		print(i)
	for j in range(B - K + 1, B + 1):
		print(j)

# Optimized solution
A, B, K = list(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 j in range(B - K + 1, B + 1):
		print(j)
# Original solution
from collections import OrderedDict
if __name__ == "__main__":
    a, b, k = list(map(int, input().split()))

    output = OrderedDict()

    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 list(output.keys()):
        print(o)


# Optimized solution
def main():
    A, B, K = list(map(int, input().split()))

    ans = list()

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

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


if __name__ == "__main__":
    main()
# Original solution
#!/usr/bin/env python3
a,b,k = list(map(int,input().split()))
for i in range(a,b+1):
    if a <= i <= a+k-1 or b-k+1 <= i <= b: print(i)

# Optimized solution
#!/usr/bin/env python3
a,b,k = list(map(int,input().split()))
for i in range(a,min(b+1,a+k)):
    if a <= i <= a+k-1: print(i)
for i in range(b-k+1,b+1):
    if a+k-1 < i:print(i)
# Original solution
A,B,K=list(map(int,input().split()))
L=list(i for i in range(A,B+1))
for i in range(B-A+1):
    if L[i] in L[:K] or L[i] in L[-K:]:
        print((L[i]))

# Optimized solution
a,b,k=list(map(int,input().split()))
r1=[i for i in range(a,min(b+1,a+k))]
r2=[i for i in range(max(a,b-k+1),b+1)]
r1.extend(r2)
result=set(r1)
for i in sorted(result):
    print(i)
# Original solution
def main():
  A, B, K = [int(x) for x in input().split()]
  l = [str(i) for i in range(A, B + 1) if i < A + K or i > B - K]
  print(('\n'.join(l)))


if __name__ == "__main__":
  main()


# Optimized solution
def main():
  A, B, K = [int(x) for x in input().split()]
  for i in range(A, min(B + 1, A + K)):
    print(i)
  for i in range(max(A + K, B - K + 1), B + 1):
    print(i)


if __name__ == "__main__":
  main()
# Original solution
a,b,k = list(map(int,input().split()))
l = []
for i in range(a,b+1):
    l.append(i)
for j in sorted(set(l[:k]) | set(l[-k:])):
    print(j)

# Optimized solution
a,b,k = list(map(int,input().split()))
l = []
if b-a >= k:
    for i in range(k):
        l.append(a+i)
    for i in range(k):
        l.append(b-i)
    l = sorted(set(l))
    for i in range(len(l)):
        print((l[i]))
else:
    for i in range(b-a+1):
        print((a+i))
# Original solution
import math
import sys
from functools import reduce
input = sys.stdin.readline

def main():
    A, B, K = list(map(int, input().split()))

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

main()

# Optimized solution
a, b, k = list(map(int, input().split()))

def it():
    for i in range(a, min(a+k, b)):
        yield i

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

for i in sorted(set(it())):
    print(i)
# Original solution
A, B, K = list(map(int, input().split()))
list = [i for i in range(A, B+1)]
list1 = list[:K]
list2 = list[(B-K-A+1):]
lists = sorted(set(list1 + list2))
for i in lists:
    print(i)

# Optimized solution
A, B, K = list(map(int, input().split()))
set1 = set([i for i in range(A, A+K)])
set2 = set([i for i in range(B+1-K, B+1)])
set3 = sorted((set1|set2))
for i in set3:
    if A<=i<=B:
        print(i)
# Original solution
A, B, K = [int(i) for i in input().split()]
for i in range(A, B+1):
    if i < A + K or B - K < i:
        print(i)


# Optimized solution
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")
# Original solution
#import numpy as np
import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial#, gcd
from bisect import bisect_left #bisect_left(list, value)
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
pl = lambda x: print(*x, sep='\n')

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

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


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

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

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

if __name__ == '__main__':
    main()
# Original solution
from collections import deque
 
A, B, K = list(map(int, input().split()))
 
value = deque()
s = [i for i in range(A, B+1)]
 
value.extend(s[0:K])
value.extend(s[len(s)-K:len(s)])
 
num = list(set(value))
num.sort()
for i in range(len(num)):
    print((num[i]))

# Optimized solution
A, B, K = list(map(int, input().split()))

value = []

if B - A < K or B <= K:
    value.extend([i for i in range(A, B+1)])
    
else:
    value.extend([i for i in range(A, A+K)])
    value.extend([i for i in range(B-K+1, B+1)])    

num = list(set(value))
num.sort()

for i in range(len(num)):
    print((num[i]))
# Original solution
a, b, k = list(map(int, input().split()))

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

for j in ans2:
    print(j)

# Optimized solution
a, b, k = list(map(int, input().split()))

li = list(range(a, b+1))
for i in sorted(set(li[:k]) | set(li[-k:])):
    print(i)
# Original solution
a,b,k = list(map(int,input().split()))
for i in range(a, b + 1):
    if i - a <= k - 1:
        print(i)
    elif b - i <= k - 1:
        print(i)

# Optimized solution
a,b,k = list(map(int,input().split()))
li = []
if 2 * k > b - a:
    for x in range(a,b+1):
        print(x)
else:
    for i in range(k):
        li.append(a + i)
    for i in range(k):
        li.append(b - i)
    for i in sorted(set(li)):
        print(i)
# Original solution
a,b,k=list(map(int,input().split()))
n =[]
for i in range(a,b+1):
    n.append(i)
nf=n[:k]
nb=n[len(n)-k:]
n=nf+nb
n=list(set(n))
n.sort()
for i in n:
    print(i)

# Optimized solution
a,b,k=list(map(int,input().split()))
n =[]
for i in range(a,a+k if k<(b-a) else b+1):
    n.append(i)
for i in range(b-k+1 if k<(b-a) else b+1,b+1):
    if(i not in n):
        n.append(i)
for i in n:
    print(i)
# Original solution
a,b,k=list(map(int,input().split()))
if k>b-a:
    for i in range(a,b+1):
        print(i)
else:
    l=[]
    s=set()
    for i in range(a,b+1):
        l.append(i)
    for i in range(k):
        s.add(l[i])
        s.add(l[-i-1])
    s_l=list(s)
    s_l.sort()
    for i in range(len(s_l)):
        print((s_l[i]))

# Optimized solution
a,b,k=list(map(int,input().split()))

ans=list(range(a,min(a+k,b)))+list(range(max(a,b-k+1),b+1))
ans=set(ans)
ans=list(ans)
ans.sort()
for i in range(len(ans)):
    print((ans[i]))
# Original solution
a,b,k=list(map(int,input().split()))
x=[]
y=[]
for i in range(a,b+1):
    x.append(i)
if len(x)<k:
    k=len(x)
for i in range(k):
    y.append(x[i])
for i in range(1,k+1):
    y.append(x[-i])
y=list(set(y))
y.sort()
for i in range(len(y)):
    print((y[i]))

# Optimized solution
a,b,k=list(map(int,input().split()))
x=[]
y=[]
if b-a<k:
    k=b-a+1
for i in range(a,a+k):
    x.append(i)
for i in range(b-k+1,b+1):
    x.append(i)
x=list(set(x))
x.sort()
for i in range(len(x)):
    print((x[i]))
# Original solution
A, B, K = list(map(int, input().split()))

def get_candidates(A, B, K):
    """Find matching numbers, return as list"""
    L = B - A + 1 # length of list
    c = set()
    for index, val in enumerate(range(A,B+1)):
        #print(index,val)
        if index < K:
            c.add(val)
        elif index >= max(0, L-K):
            c.add(val)
    #c = sorted(list(c))
    return sorted(list(c))

for n in get_candidates(A, B, K):
    print(n)

# Optimized solution
A, B, K = list(map(int, input().split()))

l1 = list(range(A,min(B+1,A+K)))
l2_lower = max(A,(B+1) - K)
l2 = list(range(l2_lower, B+1))
for n in sorted(list(set(l1+l2))):
    print(n)
# Original solution
re = list()
a,b,k = list(map(int, input().split()))
li = [i for i in range(a,b+1)]
re += li[:k]
li.sort(reverse=True)
re += li[:k]
for i in sorted(list(set(re))):
    print(i)


# Optimized solution
a,b,k = list(map(int, input().split()))
li = [i for i in range(a,b+1)] if (b-a+1)/2 < float(k) else [i for i in range(a,a+k)]+[i for i in range(b-k+1,b+1)]
for i in sorted(list(set(li))):
    print(i)
# Original solution
from collections import deque
def main():
    A, B, K = list(map(int, input().split()))
    number = deque()
    for i in range(A, B+1):
        number.append(i)
    for i in range(K):
        if len(number) > 0:
            print((number.popleft()))
    l = deque()
    for i in range(K):
        if len(number) > 0:
            l.append(number.pop())
    for i in range(len(l)):
        if len(l) > 0:
            print((l.pop()))
main()

# Optimized solution
def main():
    A, B, K = list(map(int, input().split()))
    count = 0
    for i in range(A, B+1):
        if count < K or  (B-A)-K < count:        
            print(i)
        count += 1
main()
# Original solution
A, B, K = map(int, input().split())
[print(i) for i in range(A, B+1) if i-A <= K-1 or B-i <= K-1]


# Optimized solution
A, B, K = list(map(int, input().split()))
for a in sorted(list(set([i for i in range(A, min(A + K, B+1))]) | set([i for i in range(max(A, B-K+1), B+1)]))):
    print(a)
# Original solution
# -*- coding: utf-8 -*-
a,b,k = list(map(int,input().split()))

"""
for i in range(a, b + 1):
    if a + k - 1 >= i or b - k + 1 <= i:
        print(i)
"""
tmp = []
for i in range(k):
    if a + i <= b:
        print((a + i))
        tmp.append(a + i)
for i in range(k):
    i = k - i - 1
    if (b - i >= a) and (not((b - i) in tmp)):
        print((b - i))


# Optimized solution
# -*- coding: utf-8 -*-
a,b,k = list(map(int,input().split()))

"""
for i in range(a, b + 1):
    if a + k - 1 >= i or b - k + 1 <= i:
        print(i)
"""
"""
tmp = []
for i in range(k):
    if a + i <= b:
        print(a + i)
        tmp.append(a + i)
for i in range(k):
    i = k - i - 1
    if (b - i >= a) and (not((b - i) in tmp)):
        print(b - i)
"""

#くれないさんのわかりやすい解答
ans = []
for i in range(k):
    number = a + i
    if a <= a + i <= b:
        ans.append(number)
    number = b - i
    if a <= number <= b:
        ans.append(number)
ans = list(set(ans))
ans.sort()
for i in range(len(ans)):
    print((ans[i]))
# Original solution
a,b,k=input().split()
a,b,k=int(a),int(b),int(k)

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


# Optimized solution
#from collections import deque
a,b,k=input().split()
a,b,k=int(a),int(b),int(k)

#多分両端からアクセスしないとTLEになる
'''
for i in range(b-a+1):
    if i<k:
        print(a+i)
    elif i>b-a-k:
        print(a+i)
'''

d=[]
if a+(k-1)>b:
    k=b-a+1
for i in range(k):
        d.append(a+i)
        d.append(b-i)
#辞書もsort可能
for i in sorted(set(d)):
    print(i)
# Original solution
a, b, k = list(map(int,input().split()))
lst = [i for i in range(a, b+1) if i <(a+k) or i > (b-k)]

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

# Optimized solution
a, b, k = list(map(int,input().split()))
maximum = 0

if(a+k <= b):
    for i in range(a, a+k):
        print(i)
        maximum = i
    for j in range(b-k+1, b+1):
        if(maximum < j):
            print(j)
        
else:
    for i in range(a, b+1):
        print(i)
# Original solution
for e in iter(input,'0'):
 R=[[]for _ in[0]*-~int(e)]
 for _ in[0]*int(eval(input())):
  a,b=list(map(int,input().split()))
  R[a]+=[b];R[b]+=[a]
 for m in R[1][:]:R[1]+=R[m]
 print((len({*R[1]}-{1})))


# Optimized solution
import sys
r=sys.stdin.readline
for e in iter(r,'0\n'):
 R=[[]for _ in[0]*-~int(e)]
 for _ in[0]*int(r()):
  a,b=list(map(int,r().split()))
  R[a]+=[b];R[b]+=[a]
 for m in R[1][:]:R[1]+=R[m]
 print((len({*R[1]}-{1})))
# Original solution
while True:
    e = int(eval(input()))
    if e == 0:
        break
    z, ans = 0, float('inf')
    for z in range(e):
        if z ** 3 > e:
            break
        else:
            r = e - z ** 3
            y = int(r ** 0.5)
            x = r - y ** 2
            ans = min(ans, x + y + z)
    print(ans)


# Optimized solution
while True:
    e = int(eval(input()))
    if e == 0:
        break
    z, ans = 0, float('inf')
    while z ** 3 <= e:
        r = e - z ** 3
        y = int(r ** 0.5)
        x = r - y ** 2
        ans = min(ans, x + y + z)
        z += 1
    print(ans)
# Original solution
from collections import defaultdict
counts = defaultdict(int)
for c in input():
  counts[c] += 1
allgood = True
for k in counts:
  allgood &= (counts[k] % 2 == 0)
print("Yes" if allgood else "No")

# Optimized solution
from collections import defaultdict
counts=defaultdict(int)
for c in input():counts[c]+=1
print("Yes"if all(counts[k]%2<1 for k in counts)else"No")