qyliang/CodeNanoFix huggingface dataset:
Buggy code:
a,b,k = (int(x) for x in input().split())
if b - a <= 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)

Fixed code:
a,b,k = (int(x) for x in input().split())
if (b - a+1)<= k*2:
    for i in range(a,b+1):
        print(i)
else :
    for i in range(a,a+k):
        print(i)
    for i in range(b-k+1,b+1):
        print(i)
Buggy code:
A, B, K = map(int, input().split())
l = []

for i in range(A, min(B, A+K)+1):
  l.append(i)
for i in range(max(A, B-K), B+1):
  l.append(i)
  
l = set(l)
for i in l:
  print(i)

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

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

l = list(set(l))
l.sort()
for i in l:
  print(i)
Buggy 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-K+1):
  if(A+K>i):
    continue
  print(i)

Fixed code:
A, B, K = map(int, input().split())
 
for i in range(A, A+K):
  if(i>B):
    break
  print(i)
for i in range(B-K+1, B+1):
  if(A+K>i):
    continue
  print(i)
Buggy code:
a,b,k = (int(x) for x in input().split())
if (b - a -1)<= k*2:
    for i in range(a,b+1):
        print(i)
else :
    for i in range(a,a+k):
        print(i)
    for i in range(b-k+1,b+1):
        print(i)

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


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

count=0
for i in range(b, a-1, -1):
	ans.append(i)
	count += 1
	if count > k: break

ans = sorted(set(ans), key=ans.index)

for i in ans:
	print(i)




Fixed code:
a, b, k = map(int, input().split())		# 5 7 2


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

count=0
for i in range(b, a-1, -1):
	ans.append(i)
	count += 1
	if count >= k: break

ans = sorted(set(ans))

for i in ans:
	print(i)
Buggy code:
a,b,k = map(int,input().split())
ans_list = []
for i in range(a,a+k):
    ans_list.append(i)
    if ans_list[-1] == b:
        print(ans_list)
        exit()
for i in range(b-k+1,b+1):
    if ans_list.count(i) == 0:
        ans_list.append(i)
print(ans_list)

Fixed code:
a,b,k = map(int,input().split())
ans_list = []
for i in range(a,a+k):
    ans_list.append(i)
    if ans_list[-1] == b:
        [print(i) for i in ans_list]
        exit()
for i in range(b-k+1,b+1):
    if ans_list.count(i) == 0:
        ans_list.append(i)
[print(i) for i in ans_list]
Buggy 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')

Fixed 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=sorted(list(set(ans)))
print(*ans, sep='\n')
Buggy code:
A, B, K = map(int, input().split())

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

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

if A+K-1 >= B-K+1:
    for i in range(A, B+1):
        print(i)
else:
    for i in range(A, A+K):
        print(i)
    for i in range(B-K+1, B+1):
        print(i)
Buggy code:
a, b, x = map(int, input().split())
s = set()
for i in [j for j in range(a, a+x+1)] :
  print(i)
  s.add(i)
for i in [j for j in range(b - x, b+1)] :
  if i not in s:
    print(i)

Fixed code:
a, b, x = map(int, input().split())
s = set()
for i in [j for j in range(a, min(b + 1, a + x))] :
  print(i)
  s.add(i)
for i in [j for j in range(max(a, b - x + 1), b + 1)] :
  if i not in s:
    print(i)
Buggy code:

a = input().split()

for i in range(len(a)):
 a[i] = int(a[i])

mina = a[0]
maxa = a[1]
numbers = a[2]


for i in range(mina,mina+numbers):
 print (i)

for j in range(maxa-numbers+1,maxa+1):
 if j > i:
  print (j)



Fixed code:
a = input().split()

for i in range(len(a)):
 a[i] = int(a[i])

mina = a[0]
maxa = a[1]
numbers = a[2]

for i in range(mina,mina+numbers):
 if i <= maxa:
  print (i)

for j in range(maxa-numbers+1,maxa+1):
 if j> i:
  print (j)
Buggy code:
A,B,K = map(int,input().split())
List = []
for i in range(K):
    c = A + i
    d = B - i
    if((c in List) == False and c >= A and c <= B):
        List.append(c)
    if((d in List) == False and d >= A and d <= B):
        List.append(d)
List = sorted(List)
print(List)

Fixed code:
A,B,K = map(int,input().split())
List = []
for i in range(K):
    c = A + i
    d = B - i
    if((c in List) == False and c >= A and c <= B):
        List.append(c)
    if((d in List) == False and d >= A and d <= B):
        List.append(d)
List = sorted(List)
for i in List:
    print(i)
Buggy code:
A,B,K = map(int,input().split())

num = []

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

for s in ans:
    print(s)

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

num = []

for i in range(K):
    if A+i <+ B:
        num.append(A+i)
    if B-i >= A:
        num.append(B-i)

ans = sorted(set(num))

for s in ans:
    print(s)
Buggy code:
A, B, K = (int(i) for i in input().split())

ans = []

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

for j in range(B, B-K, -1):
    ans.append(j)

ans = list(set(ans))
ans.sort()
print(ans)


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

ans = []

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

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

ans = list(set(ans))
ans.sort()
for x in ans:
    print(x)
Buggy code:
a,b,k=map(int,input().split())
c=min(a+k,b);
for i in range(a,c):print(i)
for i in range(c,b+1):print(i)

Fixed code:
a,b,k=map(int,input().split())
c=min(a+k,b);
for i in range(a,c):print(i)
for i in range(max(c,b-k+1),b+1):print(i)
Buggy code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7
#s=input().rstrip()

a,b,k=MI()
u=[]
ans=[]
for i in range(a,a+k):
    u.append(i)
for j in range(b-k+1,b+1):
    u.append(j)
for s in u:
    if a<=s<=b:
        ans.append(s)
printni(ans)

Fixed code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7
#s=input().rstrip()

a,b,k=MI()
u=[]
ans=[]
for i in range(a,a+k):
    u.append(i)
for j in range(b-k+1,b+1):
    u.append(j)
for s in u:
    if a<=s<=b:
        ans.append(s)
printni(sorted(list(set(ans))))
Buggy code:
A, B, K = map(int, input().split())
ans = set()

for i in range(K):
    ans.add(A + i)
    ans.add(B - i)

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

Fixed code:
A, B, K = map(int, input().split())
ans = set()

for i in range(min(K, B - A + 1)):
    ans.add(A + i)
    ans.add(B - i)

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

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

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

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

if b-a+1 <= 2*k:
    for num in range(a, b+1):
        print(num)
else:
    for num in range(a, a+k):
        print(num)
    for num in range(b-k+1,b+1):
        print(num)
Buggy code:
a,b,k=map(int,input().split())
ans=[]
for i in rangea(a,k+a):
  if a<=i<=b:
    ans.append(i)
    
for i in rangea(b-k+1,b+1):
  if a<=i<=b:
    ans.append(i)
ans=list(set(ans))
ans.sort()
for i in ans:
  print(i)

Fixed code:
a,b,k=map(int,input().split())
ans=[]
for i in range(a,k+a):
  if a<=i<=b:
    ans.append(i)
    
for i in range(b-k+1,b+1):
  if a<=i<=b:
    ans.append(i)
ans=list(set(ans))
ans.sort()
for i in ans:
  print(i)
Buggy code:
import collections
import sys
import numpy as np
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
MOD = 10**9+7
import itertools
import math

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


Fixed code:
import collections
import sys
import numpy as np
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
MOD = 10**9+7
import itertools
import math

a,b,k = map(int,input().split())
ans = []
if b-a<=k:
    for i in range(a,b+1):
        print(i)
else:
    for i in range(a,a+k):
        ans.append(i)
    for i in range(b-k+1,b+1):
        ans.append(i)
    ans = set(ans)
    ans = list(ans)
    ans.sort()
    for i in range(len(ans)):
        print(ans[i])
Buggy code:
import sys
A, B, K = map(int, input().split())

if B-A+1 <= K:
  for i in range(A, B+1):
    print(i)
  sys.exit()
  
ans = set()

for i in range(A, A+K):
  ans.add(i)

for i in range(B, B-K, -1):
  ans.add(i)

for x in ans:
  print(x)

Fixed code:
import sys
A, B, K = map(int, input().split())

if B-A+1 <= K:
  for i in range(A, B+1):
    print(i)
  sys.exit()
  
ans = set()

for i in range(A, A+K):
  ans.add(i)

for i in range(B, B-K, -1):
  ans.add(i)

for x in sorted(ans):
  print(x)
Buggy code:
a, b, k = list(map(int, input().split()))

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

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

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

Fixed 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(a+k, b-k+1), b+1):
  print(i)
Buggy code:
A,B,K=map(int,input().split())
b=min(A+K,B)
for i in range(A,b+1):
    print(i)
b2=max(b+1,B-K)
for i in range(b2,B+1):
    print(i)

Fixed code:
A,B,K=map(int,input().split())
b=min(A+K-1,B)
for i in range(A,b+1):
    print(i)
b2=max(b+1,B-K+1)
for i in range(b2,B+1):
    print(i)
Buggy code:
import sys
input = sys.stdin.readline
from collections import defaultdict


def read():
    A, B, K = list(map(int, input().strip().split()))
    return A, B, K


def solve(A, B, K):
    ans = defaultdict(bool)
    for a in range(A, min(A+K, B+1)):
        ans[a] = True
    for b in range(B, max(A-1, B-K), -1):
        ans[b] = True
    for a in ans.keys():
        print(a)


if __name__ == '__main__':
    inputs = read()
    outputs = solve(*inputs)
    if outputs is not None:
        print("%s" % str(outputs))


Fixed code:
import sys
input = sys.stdin.readline
from collections import defaultdict


def read():
    A, B, K = list(map(int, input().strip().split()))
    return A, B, K


def solve(A, B, K):
    d = defaultdict(bool)
    for a in range(A, min(A+K, B+1)):
        d[a] = True
    for b in range(B, max(A-1, B-K), -1):
        d[b] = True
    ans = list(sorted(d.keys()))
    for a in ans:
        print(a)


if __name__ == '__main__':
    inputs = read()
    outputs = solve(*inputs)
    if outputs is not None:
        print("%s" % str(outputs))
Buggy code:
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

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(B-K, A+1), B):
    l.append(i)

l = list(set(l))
l.sort()
print(*l, sep="\n")


Fixed code:
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

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(B-K+1, A+1), B+1):
    l.append(i)

l = list(set(l))
l.sort()
print(*l, sep="\n")
Buggy code:
a, b, k = map(int, input().split())
l = [i for i in range(a, a+k)] + [i for i in range(b-k+1, b+1)]
for i in sorted(set(l), key=l.index):
  print(i)


Fixed code:
a, b, k = map(int, input().split())
l = [i for i in range(a, min(a+k,b+1))] + [i for i in range(max(a, b-k+1), b+1)]
for i in sorted(set(l), key=l.index):
  print(i)
Buggy code:
A, B, K = map(int, input().split())
ans = []
for i in range(K):
  ans.append(A + i)
for i in range(1,K+1):
  if B-(K-i) not in ans:
    ans.append(B-(K-i))
for x in ans:
  print(x)

Fixed code:
A, B, K = map(int, input().split())
ans = []
for i in range(K):
  ans.append(A + i)
for i in range(1,K+1):
  if B-(K-i) not in ans:
    ans.append(B-(K-i))
for x in ans:
  if A <= x and x <= B:
    print(x)
Buggy code:
a=int(input())
b=int(input())
k=int(input())

c=b-a+1

a1=[]
b1=[]

for i in range(k):
    a1.append(a+i)
    b1.append(b-i)

if c>2*k-1:
    for i in range(k):
        print(a1[i])
    for i in range(k):
        print(b1[k-i-1])

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



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

c=b-a+1

a1=[]
b1=[]

for i in range(k):
    a1.append(a+i)
    b1.append(b-i)

if c>2*k-1:
    for i in range(k):
        print(a1[i])
    for i in range(k):
        print(b1[k-i-1])

else:
    for i in range(a,b+1):
        print(i)
Buggy code:
if __name__ == '__main__':
    a, b,x = map(int, input().split())
    set1=set([i for i in range(a,a+x)])
    set2=set([i for i in range(b-x+1,b+1)])
    sumSet = set1 | set2
    list = list(sumSet)
    list.sort()

    for i in list:
        print(i)


Fixed code:
if __name__ == '__main__':
    a, b,x = map(int, input().split())
    set1=set([i for i in range(a,min(a+x,b))])
    set2=set([i for i in range(max(a,b-x+1),b+1)])
    sumSet = set1 | set2
    list = list(sumSet)
    list.sort()

    for i in list:
        print(i)
Buggy code:
A, B, K = map(int,input().strip().split())

res = []

for a in range(A,min(A + K,B)):
    res.append(a)
for b in range(max(A,B - K + 1),B + 1):
    res.append(b)

print(sorted(list(set(res))))

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

res = []

for a in range(A,min(A + K,B)):
    res.append(a)
for b in range(max(A,B - K + 1),B + 1):
    res.append(b)

for r in sorted(list(set(res))):
    print(r)
Buggy code:
#coding:utf-8
n=[int(i) for i in input().split()]
if(n[1]-n[0]<=2*n[2]):
  for i in range(n[0],n[1]):
    print(i)
else:
  for i in range(n[0],n[0]+n[2]):
    print(i)
  for i jn range(n[1]-n[2]+1,n[1]):
    print(i)

Fixed code:
#coding:utf-8
n=[int(i) for i in input().split()]
if(n[1]-n[0]+1<=2*n[2]):
  for i in range(n[0],n[1]+1):
    print(i)
else:
  for j in range(n[0],n[0]+n[2]):
    print(j)
  for k in range(n[1]-n[2]+1,n[1]+1):
    print(k)
Buggy code:
A, B, K = map(int, input().split())

K2=B-A
K3=K2-K*2
if K3 > 0:
    for i in range (K):
        print ('%d'%(A+i))
    for i in range (K):
        print ('%d'%(B-K+i))

Fixed code:
A, B, K = map(int, input().split())
K2=B-A+1
K3=K2-K*2
if K3 > 0:
    for i in range (K):
        print ('%d'%(A+i))
    for i in range (K):
        print ('%d'%(B-K+i+1))
if K3 <= 0:
    for i in range (B-A+1):
        print ('%d'%(A+i))
Buggy code:
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

def main():
    a, b, k = nm()

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

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


if __name__ == '__main__':
    main()

Fixed code:
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

def main():
    a, b, k = nm()

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

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

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


if __name__ == '__main__':
    main()
Buggy code:
a,b,k = input().split()
a=int(a)
b=int(b)
k=int(k)
if b-a < k:
  k=b-a
  x=[i for i in range(a,a+k)]
  y=[i for i in range(b,b-k,-1)]
  z=x+y
  z.sort()
  z=set(z)
  z=list(z)
  z.sort()
  for i in range(len(z)):
    print(z[i])



Fixed code:
a,b,k = input().split()
a=int(a)
b=int(b)
k=int(k)
if a==b:
  print(a)
if b-a < k:
  k=b-a
x=[i for i in range(a,a+k)]
y=[i for i in range(b,b-k,-1)]
z=x+y
z.sort()
z=set(z)
z=list(z)
z.sort()
for i in range(len(z)):
    print(z[i])
Buggy code:
def main():
    A, B, K = map(int, input().split())
    [print(i) for i in range(A, min(A + K, B))]
    [print(i) for i in range(max(A + K, B - K + 1), B + 1)]

if __name__ == "__main__":
    main()

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

if __name__ == "__main__":
    main()
Buggy code:
a,b,k = map(int,input().split())
num = []

if b-a <= k:
    for i in range(a,b+1):
        print(i)
else:
    for i in range(a,a+k):
        num.append(i)
    for i in range(b-k+1,b+1):
        num.append(i)
        
    #num = list(set(num))
    #num.sort()
    
    for i in num:
        print(i)



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

if b-a <= k:
    for i in range(a,b+1):
        print(i)
else:
    for i in range(a,a+k):
        num.append(i)
    for i in range(b-k+1,b+1):
        num.append(i)
        
    num = list(set(num))
    num.sort()
    
    for i in num:
        print(i)
Buggy code:
import sys
import os
import math

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

MOD = 10 ** 9 + 7


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

    A, B, K = il()
    ret = set()
    for n in range(A, min(A+K+1, B+1)):
        ret.add(n)
    for n in range(max(B-K-1, A), B+1):
        ret.add(n)
    ret = sorted(ret)
    print(*ret, sep="\n")


if __name__ == '__main__':
    main()


Fixed code:
import sys
import os
import math

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

MOD = 10 ** 9 + 7


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

    A, B, K = il()
    ret = set()
    for n in range(A, min(A+K, B)):
        ret.add(n)
    for n in range(max(B-K+1, A), B+1):
        ret.add(n)
    print(*sorted(ret), sep="\n")


if __name__ == '__main__':
    main()
Buggy 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)

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

if (B-A)*0.5+1<=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)
Buggy code:
a,b,k = map(int,input().split())
s = set(range(a,a+k))
t = set(range(b-k+1,b+1))
u = sorted(s|t)
for i in u: if a<=i<=b: print(i)

Fixed code:
a,b,k = map(int,input().split())
s = set(range(a,a+k))
t = set(range(b-k+1,b+1))
u = sorted(s|t)
for i in u:
    if a<=i<=b: print(i)
Buggy code:
A, B, K = [int(_) for _ in input().split()]
if A+K < B-K:
    print("\n".join([str(_) for _ in list(range(A,A+K+1)) + list(range(B-K,B+1))]))
else:
    print("\n".join([str(_) for _ in list(range(A,B+1))]))

Fixed 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))]))
Buggy code:
a, b, k = map(int, input().split())

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

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


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

for x in range(a, min(a+k, b+1)):
    print(x)

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

Fixed code:
a, b, k = map(int,input().split())
n = range(a,b+1)
print(*sorted(set(n[:k]) | set(n[-k:])),sep="\n")
Buggy 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)


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

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

if (b-a)//2 + 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)
Buggy code:
A, B, K = map(int,input().split())
x = set()
for i in range(A, A+K):
  x.add(i)
for i in range(B-K+1, B+1):
  x.add(i)
for xx in sorted(x):
  print(xx)

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