qyliang/CodeNanoFix huggingface dataset:
Buggy code:
A, B, K = list(map(int, input().split()))

for i in range(K):
    n = A + i
    if A<=n and n<=B:
        print(n)
for i in range(K):
    n = B - K + i
    if A<=n and n<=B and n>A + K - 1:
        print(n)


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

for i in range(K):
    n = A + i
    if A<=n and n<=B:
        print(n)
for i in range(K):
    n = B - (K-1) + i
    if A<=n and n<=B and n>A + K - 1:
        print(n)
Buggy code:
import sys
input = sys.stdin.readline

A,B,K = list(map(int,input().split()))
num_lis = []
for i in range(A,A+K):
    if i <= B:
        num_lis.append(i)
    else:
        break
    
for i in range(B,B-K,-1):
    if i>= A:
        num_lis.append(i)
    else:
        break
b = sorted(list(set(num_lis)))
print(b)


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

A,B,K = list(map(int,input().split()))
num_lis = []
for i in range(A,A+K):
    if i <= B:
        num_lis.append(i)
    else:
        break
    
for i in range(B,B-K,-1):
    if i>= A:
        num_lis.append(i)
    else:
        break
b = sorted(list(set(num_lis)))

for i in range(len(b)):
    print(b[i])
Buggy 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)

Fixed 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 = sorted(set(l))
for i in l:
    print(i)
Buggy 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)


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

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

Fixed code:
a,b,k=map(int,input().split())
if b-k+1<=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)
Buggy code:
A, B, K = map(int,input().split())
ans = []
for i in range(K):
    if A + i <= B and A <= B - i:
        ans.append(A + i)
        ans.append(B - i)

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

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

ans = set(ans)

for i in sorted(ans):
    print(i)
Buggy code:
a, b, c = map(int, input().split())
cnt = 0
for i in range(a, a+c):
    print(i)
    cnt = i
for i in range(b-c+1, b+1):
    if i > cnt:
        print(i)


Fixed code:
a, b, c = map(int, input().split())
cnt = 0
for i in range(a, a+c):
    if i <= b:
        print(i)
    cnt = i
for i in range(b-c+1, b+1):
    if i > cnt and i >= a:
        print(i)
Buggy 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)

Fixed code:
a,b,k=map(int,input().split())
list=[]
if k>b-a+1:
    k=b-a+1
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)
Buggy code:
a,b,k=map(int,input().split())
ans=[]
for i in range(a,min(a+k,b)):
    ans.append(i)
for j in range(max(a,b-k+1),b+1):
    ans.append(j)
ans=sorted(list(set(ans)))
print(ans)
for i in range(len(ans)):
    print(ans[i])

Fixed code:
a,b,k=map(int,input().split())
ans=[]
for i in range(a,min(a+k,b)):
    ans.append(i)
for j in range(max(a,b-k+1),b+1):
    ans.append(j)
ans=sorted(list(set(ans)))
for i in range(len(ans)):
    print(ans[i])
Buggy code:
# coding: utf-8
# Your code here!

A,B,K = list(map(int,input().split(" ")))
ans = []
for i in range(K):
    if A<=A+i<=B:
        ans.append(A+i)
    if A<=A-i<=B:
        ans.append(B-i)
ans = list(set(ans))
ans.sort()
for i in ans:
    print(i)
        

Fixed code:
# coding: utf-8
# Your code here!

A,B,K = list(map(int,input().split(" ")))
ans = []
for i in range(K):
    if A<=A+i<=B:
        ans.append(A+i)
    if A<=B-i<=B:
        ans.append(B-i)
ans = list(set(ans))
ans.sort()
for i in ans:
    print(i)
Buggy code:
# coding: utf-8
import time
import re
import math

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

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

def main():
    A,B,K = map(int,input().split())
    ls=[]
    for a in range(K):
        ls.append(A + a)
        ls.append(B - K +1+ a)
    ls=set(ls)
    ls=sorted(ls)
    for a in ls:
        if (a>=A and a<=B):print(a)
main()
Buggy code:
a,b,k = map(int,input().split())
hidari = [i for i in range(a,a+k)]
migi = [j for j in range(b,b-k,-1)]
for i in migi:
    if i not in hidari:
        hidari.append(i)
hidari.sort()
for j in hidari:
    print(j)

Fixed code:
a,b,k = map(int,input().split())
if b-a+1 >= k:
    hidari = [i for i in range(a,a+k)]
    migi = [j for j in range(b,b-k,-1)]
    for i in migi:
        if i not in hidari:
            hidari.append(i)
    hidari.sort()
    for k in hidari:
        print(k)
else:
    for h in range(a,b+1):
        print(h)
Buggy code:
a,b,k=map(int,input().split())
l=[]
for i in range(a,a+k):
  l.append(i)
for i in range(b-k+1,b+1):
  l.append(i)
for x in  sorted(set(l)):
  print(x)

Fixed code:
a,b,k=map(int,input().split())
l=[]
for i in range(a,min(b+1,a+k)):
  l.append(i)
for i in range(max(a,b-k+1),b+1):
  l.append(i)
for x in  sorted(set(l)):
  print(x)
Buggy code:
# ABC093B
a,b,k = map(int,input().split())
xx =[]
for x in range(a,a+k):
    if x>b:
        break
    xx.append(x)
for x in range(b+1-k,b+1):
    if x<a:
        break
    xx.append(x)
for x in list(set(xx)):
    print(x)

Fixed code:
# ABC093B
a,b,k = map(int,input().split())
xx =[]
for x in range(a,a+k):
    if x>b:
        break
    xx.append(x)
for x in range(b+1-k,b+1):
    if x<a:
        break
    xx.append(x)
for x in sorted(list(set(xx))):
    print(x)
Buggy code:
A = list(map(int,input().split()))
a = 0
k  = []
for c in range(A[0],A[1]+1):
  print(c)
  a += 1
  if a== A[2]:
    break;
a = 0
for c in range(A[1], A[0], -1):
  if a == A[2]:
    break;
  k.append(c)
  a += 1
k = sorted(k)
for i in k:
  print(i)

Fixed code:
A = list(map(int,input().split()))
a = 0
k  = []
for c in range(A[0],A[1]+1):
  k.append(c)
  a += 1
  if a== A[2]:
    break;
a = 0
for c in range(A[1], A[0], -1):
  if a == A[2]:
    break;
  k.append(c)
  a += 1
k = sorted(list(set(k)))
for i in k:
  print(i)
Buggy code:
a,b,k=map(int,input().split())
li1 = range(a,a+k)
li2 = range(b-k+1,b+1)
se1=set(li1)
se2=set(li2)
se=sorted(se1|se2)
for i in se:
    print(i)

Fixed code:
a,b,k=map(int,input().split())
li1 = range(a,a+k)
li2 = range(b-k+1,b+1)
se1=set(li1)
se2=set(li2)
se=sorted(se1|se2)
for i in se:
    if a<=i<=b:
        print(i)
Buggy code:
a, b, k = [int(x) for x in input().split()]
if a + k - 1 < b - k + 1:
    l = list(range(a, a + k)) + list(range(b - k + 1, b + 1))
else:
    lcnt = list(range(a, b + 1))
for ans in l:
    print(ans)


Fixed code:
a, b, k = [int(x) for x in input().split()]
if a + k - 1 < b - k + 1:
    l = list(range(a, a + k)) + list(range(b - k + 1, b + 1))
else:
    l = list(range(a, b + 1))
for ans in l:
    print(ans)
Buggy code:
A, B, K = map(int, input())
S = sorted(set(list(range(A, B+1)[:K]) + list(range(A, B+1)[-K:])))
print(*S, sep="\n")


Fixed code:
A, B, K = map(int, input().split())
S = sorted(set(list(range(A, B+1)[:K]) + list(range(A, B+1)[-K:])))
print(*S, sep="\n")
Buggy code:
A,B,K = map(int,input().split())
if A-B+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)

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 = list(map(int,input().split()))
l = [i for i in range(a,a+k) if a<= i and b>=i]+[i for i in range(b, b-k, -1) if a<= i and b>=i]
ll = set(sorted(l))

for i in ll:
    print(i)

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

for i in ll:
    print(i)
Buggy code:
A, B, K = map(int, input().split())
for i in range(A, min(A + K, B)):
    print(i)

for i in range(max(B - K + 1, A + K), 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(B - K + 1, A + K), B + 1):
    print(i)
Buggy code:
A,B,K=map(int,input().split())
ks=[]
for i in range(K):
    ks.append(A+i)
    ks.append(B-i)
new_ks=list(set(ks))
new_ks.sort()
for i in range(len(new_ks)):
    print(new_ks[i])
    

Fixed code:
A,B,K=map(int,input().split())
ks=[]
for i in range(K):
    if (A+i)<=B:
        ks.append(A+i)
    if A<=(B-i):
        ks.append(B-i)
new_ks=list(set(ks))
new_ks.sort()
for i in range(len(new_ks)):
    print(new_ks[i])
Buggy code:

import math
import itertools
import statistics
#import numpy as np
#import collections
a, b, k = list(map(int, input().split()))
l = []

if k > b-a:
    k = b-a

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

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

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

Fixed code:

import math
import itertools
import statistics
#import numpy as np
#import collections
a, b, k = list(map(int, input().split()))
l = []

"""
if k > b-a:
    k = b-a
"""

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


ans = list(set(l))
ans.sort()
for i in range(len(ans)):
    if ans[i] >= a and ans[i] <= b:
        print(ans[i])
Buggy code:
a,b,k=map(int,input().split())

ans=[]

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

ans.sort()

for a in ans:
    print(a)

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

ans=[]

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

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


for a in ans:
    print(a)
Buggy code:
A,B,K=map(int, input().split())
L = []
for i in range(min(K,A+B//2)):
  L.append(A+i)
for i in range(min(K,A+B//2)):
  L.append(B-i)
L = set(L)
for i in L:
  print(i)
  

Fixed code:
A,B,K=map(int, input().split())
L = []
for i in range(min(K,(B-A+2)//2)):
  L.append(A+i)
for i in range(min(K,(B-A+2)//2)):
  L.append(B-i)
L = sorted(list(set(L)))
for i in L:
  print(i)
Buggy 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)

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


Fixed code:
a,b,k=map(int,input().split())
m=[]
for i in range(a,min(a+k,b+1)):
    m.append(i)
for i in range(max(b-k+1,a),b+1):
    m.append(i)
l=set(m)
ll=list(l)
lll=sorted(ll)
for i in range(len(lll)):
    print(lll[i])
Buggy code:
a,b,k=map(int,input().split())
if (b-a)>2*k:
  ans=[i for i in range(a,a+k+1)]+[i for i in range(b-k,b+1)]
else:
  ans=[i for i in range(a,b+1)]
for i in ans:
  print(i)

Fixed code:
a,b,k=map(int,input().split())
if b-a+1>2*k:
  ans=sorted(list(set([i for i in range(a,a+k)]+[i for i in range(b-k+1,b+1)])))
else:
  ans=[i for i in range(a,b+1)]
for i in ans:
  print(i)
Buggy code:
A, B, K = map(int, input().split())
if 2 * K >= A - B:
    for i in range(A, B+1):
        print(i)
else:
    for i in range(K-1):
        print(A+i)
    for i in range(K-1, 0, -1):
        print(B-i)

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

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

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

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

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

W = list(range(A,A+K))
w = list(range(B-K+1,B+1))

A = sorted(set(W+w))
for i in A: print(i)

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

W = list(range(A,min(A+K,B+1)))
w = list(range(max(A,B-K+1),B+1))

A = sorted(set(W+w))
for i in A: 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+1-k,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+1-k),b+1):
    print(i)
Buggy code:
a,b,k=map(int, input().split())
if (b-a)/2<=k:
    for i in range(b-a+1):
        print(a+i)
else:
    for i in range(k):
        print(a+i)
    for i in range(k):
        print(b-i)


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

nums = []
for i in range(a, min(b,a+k)): nums.append(i)
for i in range(b, max(0,b-k), -1): nums.append(i)
for i in sorted(set(nums)): print(i)

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

nums = []
for i in range(a, min(b+1,a+k)): nums.append(i)
for i in range(b, max(a-1,b-k), -1): nums.append(i)
for i in sorted(set(nums)): print(i)
Buggy 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())
se = set(range(A, A + K) | range(B - K + 1, B + 1))
li = list(se)
li = [x for x in li if A << x << B]

li.sort()
print(*li, sep='\n')


Fixed 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())
se = set(range(A, A + K)) | set(range(B - K + 1, B + 1))
li = list(se)
li = [x for x in li if A <= x <= B]
li.sort()
print(*li,sep='\n')
Buggy 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)]

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

[print(i) for i in sorted(A)]
Buggy code:
A,B,K=map(int,input().split())

C=[]
for i in range(K):
  C.append(A+i)
for i in range(K):
  C.append(B-i)
#print(C)

C=list(set(C))
C.sort()
#print(C)

for i in C:
  print(i)

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

C=[]
for i in range(min(K,B-A+1)):
  C.append(A+i)
for i in range(min(K,B-A+1)):
  C.append(B-i)
#print(C)

C=list(set(C))
C.sort()
#print(C)

for i in C:
  print(i)
Buggy code:
a, b, k = map(int, input().split())

res = []

for i in range(a, min(a+k, b)):
    res.append(i)
print(res)
for j in range(max(0, b-k)+1, b+1):
    res.append(j)

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

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

res = []

for i in range(a, min(a+k, b+1)):
    res.append(i)

for j in range(max(a, b-k+1), b+1):
    res.append(j)

for k in sorted(set(res)):
    print(k)
Buggy code:
#coding:utf-8                           
                                        
ABK = [int(i) for i in input().split()] 
A, B, K = ABK[0], ABK[1], ABK[2]        
                                        
if B - A > K / 2:                       
  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)                            
                                        


Fixed code:
#coding:utf-8                           
                                        
ABK = [int(i) for i in input().split()] 
A, B, K = ABK[0], ABK[1], ABK[2]        
                                        
if (B - A)/2 >= K:                       
  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)
Buggy code:
min, max, K = map(int, input().split())

if ((max - min + 1) > 2*K):
    for i in range(min, max+1):
        print(i)

else:
    for i in range(min, min+K):
        print(i)
    for i in range(max-K, max+1):
        print(i)

Fixed code:
min, max, K = map(int, input().split())

if ((max - min + 1) < 2*K):
    for i in range(min, max+1):
        print(i)

else:
    for i in range(min, min+K):
        print(i)
    for i in range(max-K+1, max+1):
        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+1-K,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:
# 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)

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

for i in range(max(B - K + 1, A + K), B + 1):
    print(i)
Buggy 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)

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

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

l = sorted(list(t))

for i in l:
    print(i)
Buggy code:
A, B, K = [int(x) for x in input().split()]

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


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

u = set(range(A, min(B+1, A+K)))
l = set(range(B, max(A-1, B-K),-1))
for i in sorted(u | l):
    print(i)
Buggy code:
a, b, k = map(int, input().split())
for i in range(a, b + 1):
  if i - a <= k or b - i <= k:
    print(i)


Fixed code:
a,b,k = map(int, input().split())
if a+k-1 < b-k+1:
    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)
Buggy code:
A, B, K = map(int, str(input()).split(" "))
disp = []
for i in [j for j in range(A, A + K) if j <= B]:
    disp.append(i)
for i in [j for j in range(B - K + 1, B + 1) if A <= j]:
    disp.append(i)
for i in set(disp):
    print(i)

Fixed code:
A, B, K = map(int, str(input()).split(" "))
disp = []
for i in [j for j in range(A, A + K) if j <= B]:
    disp.append(i)
for i in [j for j in range(B - K + 1, B + 1) if A <= j]:
    disp.append(i)
for i in sorted(set(disp)):
    print(i)
Buggy code:
a,b,k = map(int,input().split())
L = []
for i in range(a,a+k) :
    
    if a <= i <= b :
        L.append(i)
for j in range(b-k+1,b+1) :
    
    if a <= j <= b :
        L.append(j)
L = list(set(L))
L = sorted(L)
print(L)


Fixed code:
a,b,k = map(int,input().split())
L = []
for i in range(a,a+k) :
    
    if a <= i <= b :
        L.append(i)
for j in range(b-k+1,b+1) :
    
    if a <= j <= b :
        L.append(j)
L = list(set(L))
L = sorted(L)
for i in range(len(L)) :
    print(L[i])
Buggy code:
A,B,K = map(int,input().split())
L = []
for i in range(K) :
    a = A+i
    b = B-i
    L.append(a)
    L.append(b)
L = list(set(L))
ANSWER = sorted(L)
for j in range(len(ANSWER)) :
    print(ANSWER[j])

    

Fixed code:
A,B,K = map(int,input().split())
L = []
for i in range(K) :
    a = A+i
    b = B-i
    if a <= B :
        L.append(a)
    if b >= A :
        L.append(b)
L = list(set(L))
ANSWER = sorted(L)
for j in range(len(ANSWER)) :
    print(ANSWER[j])
Buggy code:
# -*- coding: utf-8 -*-
import numpy as np
inputs = input().split()
A = int(inputs[0])
B = int(inputs[1])
K = int(inputs[2])


if A + K < B - K:
    candidates = np.concatenate(np.arange(A, A + K), np.arange(B - K, B))
else:
    candidates = np.arange(A, B + 1)
    candidates = candidates[np.logical_or(candidates < A + K, candidates > B - K)]

for s in np.sort(candidates):
    print(s)


Fixed code:
# -*- coding: utf-8 -*-
import numpy as np
inputs = input().split()
A = int(inputs[0])
B = int(inputs[1])
K = int(inputs[2])


if A + K < B - K:
    candidates = np.concatenate([np.arange(A, A + K), np.arange(B - K + 1, B + 1)])
else:
    candidates = np.arange(A, B + 1)
    candidates = candidates[np.logical_or(candidates < A + K, candidates > B - K)]

for s in candidates:
    print(s)
Buggy code:
a,b,k=map(int,input().split())
ans=[]
i=0
while i<k and a+i<b-i:
  ans.append(a+i)
  ans.append(b-i)
  i=i+1
ans=list(set(ans))
ans.sort()
for i in range(0,len(ans)):
  print(ans[i])

Fixed code:
a,b,k=map(int,input().split())
ans=[]
i=0
while i<k and a+i<=b-i:
  ans.append(a+i)
  ans.append(b-i)
  i=i+1
ans=list(set(ans))
ans.sort()
for i in range(0,len(ans)):
  print(ans[i])
Buggy 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)

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

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

for j in range(b - k + 1, b + 1):
    if i < j:
        print(j)
Buggy 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-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(B-K+1,A+K),B+1):
  print(i)