qyliang/CodeNanoFix huggingface dataset:
Buggy code:
A, B, K = map(int,input().split())
res = set()
for i in range(A, A+K):
  res.add(i)
for i in range(B-K+1, B+1):
  res.add(i)
for r in sorted(res):
  print(r)

Fixed code:
A, B, K = map(int,input().split())
res = set()
for i in range(A, B+1)[:K]:
  res.add(i)
for i in range(A, B+1)[-K:]:
  res.add(i)
for r in sorted(res):
  print(r)
Buggy code:
A, B, K = map(int,input().split())
ans = []
for i in range(A, B+1)[:K]:
  ans.append(i)
for i in range(A, B+1)[-K:]:
  ans.append(i)
for a in list(set(ans)):
  print(a)

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

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

if b - k <= 0:
  b_k = a
else:
  b_k = b - k


result = sort(list(set([i for i in range(a, a_k + 1)] + [i for i in range(b_k, b + 1)])))
for n in result:
  print(n)

Fixed code:
a, b, k = map(int, input().split())
if a + k > b:
  a_k = b
else:
  a_k = a + k

if b - k < a:
  b_k = a
else:
  b_k = b - k
  
if a == b:
  a_k = a + 1
  b_k = b + 1

result = list(set([i for i in range(a, a_k)] + [i for i in range(b_k + 1, b + 1)]))
result.sort()
for n in result:
  print(n)
Buggy code:
A, B, K = map(int, input().split())

if A-B >= 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)

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

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

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

"""
for i in range(a,b+1):
            #print("i",i)
            if i<a+k:
                        print(i)
            elif b-k<i:
                        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)

"""
for i in range(a,b+1):
            #print("i",i)
            if i<a+k:
                        print(i)
            elif b-k<i:
                        print(i)
"""
Buggy code:
a, b, k = map(int, input().split())

lower_list = [i for i in range(a, a + k)]
upper_list = [i for i in range(b, b - k + 1, -1)]

out_list = sorted(set(lower_list + upper_list))
for out in out_list:
    if a <= out <= b:
        print(out)

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

lower_list = [i for i in range(a, a + k)]
upper_list = [i for i in range(b, b - k, -1)]
out_list = sorted(set(lower_list + upper_list))

for out_val in out_list:
    if a <= out_val <= b:
        print(out_val)
Buggy code:
a,b,k = map(int,input().split())

min_li = [i for i in range(a,a+k)]
max_li = [i for i in range(b-k+1,b+1)]

print('\n'.join(map(str,set(min_li+max_li))))

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

min_li = [i for i in range(a,min(a+k,b+1))]
max_li = [i for i in range(max(b-k+1,a),b+1)]

print('\n'.join(map(str,sorted(set(min_li+max_li)))))
Buggy code:
import sys


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


if __name__ == '__main__':
    solve()


Fixed code:
import sys


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


if __name__ == '__main__':
    solve()
Buggy code:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    a, b, k = list(map(int, readline().split()))
    ans = set()
    for i in range(a, min(a + k , b)):
        ans.add(i)
    for i in range(b, max(b - k, a), - 1):
        ans.add(i)
    print(*sorted(list(ans)))


if __name__ == '__main__':
    solve()


Fixed code:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    a, b, k = list(map(int, readline().split()))
    st = set()
    for i in range(a, min(a + k, b + 1)):
        st.add(i)
    for i in range(b, max(b - k, a - 1), - 1):
        st.add(i)
    for v in sorted(st):
        print(v)


if __name__ == '__main__':
    solve()
Buggy code:
a, b, k = map(int, input().split())
for i in sorted(list(set(range(a, a + k)) | set(range(b - k + 1, b + 1)))):
    print(i)

Fixed code:
a, b, k = 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)
Buggy 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+1):
    print(i)
  for i in range(b-k, b+1):
    print(i)

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

if k < (b - a + 1) / 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)
Buggy code:
a,b,k = map(int, input().split())
if a + k - 1 < b:
  min_ = a + k - 1
else:
  for i in range(a, b + 1):
    print(i)
  exit(0)
max_ = b - k + 1
for i in range(a, min_ + 1):
    print(i)
for i in range(max_, b + 1):
    print(i)

Fixed code:
a,b,k = map(int, input().split())
if a + k - 1 < b:
  min_ = a + k - 1
else:
  for i in range(a, b + 1):
    print(i)
  exit(0)
max_ = b - k + 1
if max_ <= min_:
  for i in range(a, b + 1):
    print(i)
  exit(0)
for i in range(a, min_ + 1):
    print(i)

for i in range(max_, b + 1):
    print(i)
Buggy code:
a,b,n=map(int,input().split())
Alist = list(range(a,min(a+n,b),1))
Blist = list(range(max(a,b-n)+1,b+1,1))
C = set(Alist)|set(Blist)
for i in list(C):
  print(i)

Fixed code:
a,b,n=map(int,input().split())
Alist = list(range(a,min(a+n,b+1),1))
Blist = list(range(max(a,b-n+1),b+1,1))
C = sorted(set(Alist)|set(Blist))
for i in list(C):
  print(i)
Buggy code:
a,b,k = map(int,input().split())
A=[]
for i in range(a,min(a+k+1,b+1)):
    A.append(i)
for j in range(b,max(b-k,a),-1):
    A.append(j)
A.sort(reverse=False)
B=list(set(A))
for p in range(len(B)):
    print(B[p])

Fixed code:
a,b,k = map(int,input().split())
A=[]
B=[]
for i in range(a,min(a+k,b+1)):
    A.append(i)
for j in range(b,max(b-k,a-1),-1):
    A.append(j)
B=list(set(A))
B.sort(reverse=False)
for p in range(len(B)):
    print(B[p])
Buggy code:
a,b,k = map(int,input().split())
A=[]
for i in range(a,a+k):
    A.append(i)
B=[]
for i in range(b,b-k,-1):
    B.append(i)
C=list(set(A+B))
C.sort(reverse=False)
for j in range(len(C)):
    print(C[j])

Fixed code:
a,b,k = map(int,input().split())
A=[]
for i in range(a,min(a+k,b+1)):
    A.append(i)
B=[]
for i in range(b,max(b-k,a-1),-1):
    B.append(i)
C=list(set(A+B))
C.sort(reverse=False)
for j in range(len(C)):
    print(C[j])
Buggy code:
A,B,K = map(int, input().split())

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

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

if B-A+1<= 2*K:
    print(*range(A,B+1), sep="\n")
else:
    a = list(range(A,A+K))
    b = list(range(B-K+1,B+1))
    C = sorted(set(a+b))
    print(*C, sep="\n")
Buggy code:
A,B,K = map(int, input().split())
if B - A + 1> 2*K:
    a = list(range(A, A+K))
    b = list(range(B-K+1,B+1))
    c = set(a+b)
    print(*c, sep="\n")
else:
    print(*range(A,B+1), sep="\n")

Fixed code:
A,B,K = map(int, input().split())
if B - A + 1> 2*K:
    a = list(range(A, A+K))
    b = list(range(B-K+1,B+1))
    c = sorted(set(a+b))
    print(*c, sep="\n")
else:
    print(*range(A,B+1), sep="\n")
Buggy code:
A, B, K = map(int, input().split())

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

if abs(A - B) >= 2 * K:
  for j in reversed(range(min(K, B - A))):
    print(B - j)
else:
  for j in reversed(range(min(K-1, B - A))):    
    print(B - j) 

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

if abs(A - B) >= 2 * K:
  for i in range(K):
    print(A + i)
  for j in reversed(range(K)):
    print(B - j)
else:
  for k in range(A, B+1):    
    print(k)
Buggy code:
a,b,k=map(int,input().split())
if b-a+1>k*2:
  for i in range(a,a+k):
    print(i)
  for j in range(b-k,b):
    print(j)
else:
  for h in range(a,b):
    print(h)

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

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

m  = min(A+K+1, B+1)
for i in range(A, m):
    print(i)
n = max(A+K+1, B-K, B)
for j in range(n, B+1):
    print(j)

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

m  = min(A+K, B+1)
for i in range(A, m):
    print(i)
n = max(A+K, B-K+1)
for j in range(n, B+1):
    print(j)
Buggy code:
A, B, K = map(int, input().split())

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

else:
    for i in range(A, A+K):
        print(i)
    
    for j in range(max(i, B-K), B):
        print(j)

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

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

else:
    for i in range(A, A+K):
        print(i)
    
    for j in range(max(i, B-K), B):
        print(j+1)
Buggy code:
ip=[int(x) for x in input().split()]
a=ip[0]
b=ip[1]
k=ip[2]
if k>=(b-a+1):
  for i in range(a,b+1):
    print(i)
else:
	lw=list(range(a,a+k))
	hg=list(range(b-k,b))
	res=list(set(lw+hg))
	res.sort()
	for i in res:
  		print(i)

Fixed code:
ip=[int(x) for x in input().split()]
a=ip[0]
b=ip[1]
k=ip[2]
if k>=(b-a+1):
  for i in range(a,b+1):
    print(i)
else:
	lw=list(range(a,a+k))
	hg=list(range(b-k+1,b+1))
	res=list(set(lw+hg))
	res.sort()
	for i in res:
  		print(i)
Buggy code:
a,b,k=map(int,input().split())
x=[]
y=[]
if b-a<k:
    k=b-a
for i in range(a,a+k):
    x.append(i)
for i in range(b-k+1,b+1):
    x.append(i)
y=list(set(x))
x.sort()
for i in range(len(x)):
    print(x[i])

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

Fixed code:
A,B,K = map(int, input().split())
ans = []
for i in range(A, A+K):
  ans.append(i)
for i in range(B-K+1, B+1):
  ans.append(i)
ans = list(set(ans))
ans.sort(reverse=False)
for i in ans:
  if i>=A and i<=B:
    print(i)
Buggy code:
a,b,k = map(int,input().split())
ans = []
for i in range(k):
  ans.append(a+i)
  ans.append(b-i)
ans.sort()
last = 'null'
for i in range(len(ans)):
  if ans[i] != last:
    print(ans[i])
  last = ans[i]

Fixed code:
a,b,k = 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.sort()
last = 'null'
for i in range(len(ans)):
  if ans[i] != last:
    print(ans[i])
  last = ans[i]
Buggy code:
a,b,k=map(int,input().split())
if a+k>=b-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,b):
        print(i)

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

if k * 2 > (b - a):
    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())

numlist=[]
if k>b-a:
    k=b-a
for i in range(k):
    numlist.append(a+i)
for i in range(k)[::-1]:
    numlist.append(b-i)
numset=set(numlist)
numlist=list(numset)
for item in numlist:
    print(item)

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

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

for i in range(k):
    numlist.append(a+i)
    numlist.append(b-i)
numlist=sorted(list(set(numlist)))
for item in numlist:
    print(item)
Buggy code:
a,b,c=map(int,input().split())
list=[]
list.append(a)
list.append(b)
for i in range(c-1):
    a+=1
    b+=-1
    list.append(a)
    list.append(b)
list=sorted(set(list))
for j in range(len(list)):
    print(list[j])

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

for num in range(k):
    if a + num <= b:
        ans_set.add(a + num)

for num in range(k):
    num = k - num - 1
    if b - num >= a:
        ans_set.add(b - num)
for num in ans_set:
    print(num)


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

for num in range(k):
    if a + num <= b:
        ans_set.add(a + num)

for num in range(k):
    num = k - num - 1
    if b - num >= a:
        ans_set.add(b - num)
for num in sorted(ans_set):
    print(num)
Buggy code:
a, b, k = map(int, input().split())
 
tmp = range(a, b+1)
for a in sorted(list(set(tmp[:k] + tmp[-k:]))):
    print(a)

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

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

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

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



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

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

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

  for i in sorted(nList):
    print(i)
Buggy code:
a,b,c=map(int,input().split())
if c>=(a+b+1)//2:
  for i in range(a,b+1):
    print(i)
else:
  for i in range(a,a+c):
    print(i)
  for i in range(b-c+1,b+1):
    print(i)

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

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

t = list(set(t))
t.sort()

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

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

for i in range(a,a+k):
    if i <= b:
        t.append(i)
for i in range(b-k+1,b+1):
    if i >= a:
        t.append(i)

t = list(set(t))
t.sort()

for i in range(len(t)):
    print(t[i])
Buggy code:
a, b, k = map(int, input().split())
ret = []
for i in range(k):
    ret.append(a + i)
for i in range(max(a, b - k + 1), b + 1):
    ret.append(i)
ret = sorted(list(set(ret)))
for i in ret:
    print(i)


Fixed code:
a, b, k = map(int, input().split())
ret = []
for i in range(k):
    ret.append(min(a + i, b))
for i in range(max(a, b - k + 1), b + 1):
    ret.append(i)
ret = sorted(list(set(ret)))
for i in ret:
    print(i)
Buggy code:
A, B, K = map(int, input().split())
C = set()

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

C = list(C)
C.sort()

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


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

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

C = list(C)
C.sort()

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


Fixed code:
a, b, k = map(int, input().split())
ans = []
for i in range(a, min(a + k, b + 1)):
    ans.append(i)
for i in range(b, max(b - k, a - 1), -1):
    if i not in ans:
        ans.append(i)
ans.sort()
for i in ans:
    print(i)
Buggy code:
l = list(map(int,input().split()))
a,b,k = l[0],l[1],l[2]
c = []
for i in range(a,min(a+k,b)):
    c.append(i)
for i in range(max(b-k+1,0),b+1):
    if i not in c:
        c.append(i)
for i in c:
    print(i)

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

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

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

print(ans)

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

for j in sorted(set(ans)):
  print(j)

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

for j in sorted(set(ans)):
  if a <= j <= b:
    print(j)
Buggy code:
A,B,K = map(int,input().split())

if A+B >= 2*K:
    for up in range(A,A+K):
        print(up)
    for down in range(B-K+1,K+1):
        print(down)
else:
    for i in range(A,B+1):
        print(i)
    

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

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

else:
    for i in range(A,B+1):
        print(i)
Buggy code:
# coding=utf-8


def from_down(base, number, upper):
    return_list = []
    range_upper = min(upper+1, base+number)
    for i in range(base, range_upper):
        return_list.append(i)
    return return_list


def from_up(base, number, down):
    return_list = []
    range_down = max(base-number+1, down)
    for i in range(range_down, base+1):
        return_list.append(i)
    return return_list


def remove_double(object_list):
    list_unique = []
    for x in object_list:
        if x not in list_unique:
            list_unique.append(x)
    return list_unique


if __name__ == '__main__':
    A, B, K = map(int, input().split())
    down_list = from_down(A, K, B)
    upper_list = from_up(B, K, A)
    print(down_list)
    print(upper_list)
    down_list.extend(upper_list)
    print(down_list)
    unique_list = remove_double(down_list)
    print(unique_list)


Fixed code:
# coding=utf-8


def from_down(base, number, upper):
    return_list = []
    range_upper = min(upper+1, base+number)
    for i in range(base, range_upper):
        return_list.append(i)
    return return_list


def from_up(base, number, down):
    return_list = []
    range_down = max(base-number+1, down)
    for i in range(range_down, base+1):
        return_list.append(i)
    return return_list


def remove_double(object_list):
    list_unique = []
    for x in object_list:
        if x not in list_unique:
            list_unique.append(x)
    return list_unique


if __name__ == '__main__':
    A, B, K = map(int, input().split())
    down_list = from_down(A, K, B)
    upper_list = from_up(B, K, A)
    down_list.extend(upper_list)
    unique_list = remove_double(down_list)
    output = [print(element) for element in unique_list]
Buggy code:
A,B,K=map(int, input().split())
if B-A<2*K:
  for i in range(A,B+1):
    print(i)
else:
  for i in range(K):
    print(A+i)
  for i in range(K):
    print(B-K+i)

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

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

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


Fixed code:
a, b, k = map(int, input().split())
for i in range(a, min(b+1, a+k)):
  print(i)
for i in range(max(b-k+1, a+k), b+1):
  print(i)
Buggy code:
va, b, k = [int(i) for i in input().split()]
print(*([i for i in range(a, min(a + k, b + 1))] + [i for i in range(max(a + k, b - k + 1), b + 1)]), sep="\n")

Fixed code:
a, b, k = [int(i) for i in input().split()]
print(*([i for i in range(a, min(a + k, b + 1))] + [i for i in range(max(a + k, b - k + 1), b + 1)]), sep="\n")
Buggy code:
a,b,k=map(int,input().split())

ans=list(set(list(i for i in range(a,a+k+1,1) if i<=b)+list(j for j in range(b,b-k-1,-1) if j>=a)))

for l in ans:
    print(l)


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

ans=list(set(list(i for i in range(a,a+k,1) if i<=b)+list(j for j in range(b,b-k,-1) if j>=a)))

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

Fixed code:
a, b, k = map(int, input().split())
s = set(range(a, min(b + 1, a + k)))
s.update(range(b, max(a - 1, b - k), -1))
s = sorted(s)
print('\n'.join(map(str, s)))
Buggy code:
A, B, K = map(int, input().split())
for i in range(A, min(A+K, B)):
    print(i)
for j in range(max(B-K+1, A), B+1):
    print(j)

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=[int(x) for x in input().split()]
print(a,b,k)#
ans = []
for i in range(k):
  if a+i<=b:ans.append(a+i)
  if b-i>=a:ans.append(b-i)
#print(ans)#
ans = list(set(ans))
ans.sort()
for e in ans: print(e)


Fixed code:
a,b,k=[int(x) for x in input().split()]
#print(a,b,k)#
ans = []
for i in range(k):
  if a+i<=b:ans.append(a+i)
  if b-i>=a:ans.append(b-i)
#print(ans)#
ans = list(set(ans))
ans.sort()
for e in ans: print(e)