qyliang/CodeNanoFix huggingface dataset:
Buggy 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(A+K,B-K),B+1):
    print(i)

Fixed code:
A, B, K = map(int,input().split())
for i in range(A,min(B,A+K-1)+1,1):
    print(i)
for j in range(max(B-K+1,A+K),B+1,1):
    print(j)
Buggy code:
A,B,K=map(int,input().split())
List=[]
for i in range(K):
  List.append(A+i)
  List.append(B-i)
s_l=set(List)
NewList=list(s_l)
NewList.sort()
for i in NewList:
  print(i)

Fixed code:
A,B,K=map(int,input().split())
List=[]
for i in range(K):
  if A<= A+i <= B:
    List.append(A+i)
  if A<= B-i <= B:
    List.append(B-i)
s_l=set(List)
NewList=list(s_l)
NewList.sort()
for i in NewList:
  print(i)
Buggy code:
a, b, k = map(int, input().split())

used = set()
for i in range(a, a+k):
  print(i)
  used.add(i)
for i in range(b-k+1, b+1):
  if not i in used:
    print(i)

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

used = set()
for i in range(a, min(a+k, b)):
  print(i)
  used.add(i)
for i in range(max(a, b-k+1), b+1):
  if not i in used:
    print(i)
Buggy code:
import sys
from collections import Counter
readline = sys.stdin.buffer.readline
MOD = 10**9+7

def main():
    A, B, K = map(int, readline().split())
    left = set(list(range(A, min(A+K, B+1))))
    right = set(list(range(B, max(B-K, A-1), -1)))
    ans = left | right
    for i in ans:
        print(i)


if __name__ == '__main__':
    main()

Fixed code:
import sys
from collections import Counter
readline = sys.stdin.buffer.readline
MOD = 10**9+7

def main():
    A, B, K = map(int, readline().split())
    left = set(list(range(A, min(A+K, B+1))))
    right = set(list(range(B, max(B-K, A-1), -1)))
    ans = list(left | right)
    ans.sort()
    for i in ans:
        print(i)


if __name__ == '__main__':
    main()
Buggy code:
A, B, K = [int(i) for i in input().split()]

numbers = set() 
for i in range(A, A+K):
    if i <= B:
        numbers.add(i)
    
for j in range(B-K, B):
    if j >= A:
        numbers.add(j+1)
    
for n in numbers:
    print(n)

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

numbers = set() 
for i in range(A, A+K):
    if i <= B:
        numbers.add(i)
    
for j in range(B-K, B):
    if j >= A:
        numbers.add(j+1)
        
numbers = sorted(numbers)

for n in numbers:
    print(n)
Buggy code:
a,b,k=map(int,input().split())
if k*2>b:
    for i in range(a,b+1):
        if i<a+k:
            print(i)
        elif b-k<i:
            print(i)
else:
    for i in range(a,min(a+k,b+1)):
        print(i)
    for i in range(max(a,b-k+1),b+1):
        print(i)

Fixed code:
a,b,k=map(int,input().split())
if k*2>b:
    for i in range(a,b+1):
        if i<a+k:
            print(i)
        elif b-k<i:
            print(i)
else:
    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:
mi, ma, num = map(int,input().split())
ans = []
for i in range(mi,mi+num):
  ans.append(i)
for j in range(ma-num+1,ma+1):
  if j not in ans:
    ans.append(j)
for k in ans:
  print(k)


Fixed code:
mi, ma, num = map(int,input().split())
ans = []
if num <= ma-mi+1:
  for i in range(mi,mi+num):
    ans.append(i)
  for j in range(ma-num+1,ma+1):
    if j not in ans:
      ans.append(j)
  for k in ans:
    print(k)
else:
  for l in range(mi,ma+1):
    print(l)
Buggy code:
A, B, K = map(int, input().split())
L = []

for i in range(K):
    if A + i > B - i:
        break
    else:
        L.append(A + i)
        L.append(B - i)

L = sorted(L)
L = set(L)

for l in L:
    print(l)

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

for i in range(K):
    if A + i > B - i:
        break
    else:
        L.append(A + i)
        L.append(B - i)

L = set(L)
L = sorted(L)

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

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

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

aa = list(range(a,min(a+k,b)))
bb = list(range(max(b-k+1,a),b+1))
aa.extend(bb)
c = set(aa)
d = list(c)
for i in range(len(d)):
    print(d[i])

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

aa = list(range(a,min(a+k,b)))
bb = list(range(max(b-k+1,a),b+1))
aa.extend(bb)
c = set(aa)
d = list(c)
d = sorted(d)
for i in range(len(d)):
    print(d[i])
Buggy code:
A, B, K = map(int, input().split())
x=[]
if (B-A) <= K:
    for i in range(A, B+1):
        print(i)
else:
    for i in range(A, A+K):
        x.append(i)
    for i in range(B-K, B+1):
        x.append(i)
for i in x:
    print(i)

Fixed code:
A, B, K = map(int, input().split())
x=[]
if (B-A) <= K:
    for i in range(A, B+1):
        print(i)
else:
    for i in range(A, A+K):
        x.append(i)
    for i in range(B-K+1, B+1):
        x.append(i)
    x=sorted(set(x))
    for i in x:
        print(i)
Buggy code:
A, B, K = map(int, input().split())
select = []
for i in range(A, min(B, A+K)):
    select.append(i)
for i in range(max(A, B-K+1), B+1):
    select.append(i)

for i in set(select):
    print(i)

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

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


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


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

    min_right = max(B - (K - 1), max_left + 1)
    max_right = B

    left = set(range(min_left, max_left + 1))
    right = set(range(min_right, max_right + 1))

    unique_nums = left | right

    return '\n'.join(map(str, sorted(unique_nums)))

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

Fixed code:
def actual(A, B, K):
    min_left = A
    max_left = min(A + (K - 1), B)

    min_right = max(B - (K - 1), max_left + 1)
    max_right = B

    left = set(range(min_left, max_left + 1))
    right = set(range(min_right, max_right + 1))

    unique_nums = left | right

    return '\n'.join(map(str, sorted(unique_nums)))

A, B, K = map(int, input().split())
print(actual(A, B, K))
Buggy code:
a, b, k = map(int, input().split())

upper = min(a + k, b + 1)
bottom = min(max(b - k, upper), a + k, )

for i in range(a, upper):
    print(i)
for j in range(bottom, b + 1):
    print(j)


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

upper = min(a + k, b)
bottom = max(b - k + 1, upper)

for i in range(a, upper):
    print(i)
for j in range(bottom, b + 1):
    print(j)
Buggy code:
# -*- coding: utf-8 -*-

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

for i in range(a,a+k):
    lists.append(i)

for i in range(b,b-k,-1):
    lists.append(i)

l = set(lists)
m = list(l)

m.sort()

for i in m:
    print(i)


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

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

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

for i in range(b,max(b-k,a),-1):
    lists.append(i)

l = set(lists)
m = list(l)

m.sort()

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

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

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

sub1 = [i for i in range(A,A+K)]
sub2 = [i for i in range(B-K+1,B+1)]
sub = set(sub1) | set(sub2)
sub = sorted(sub)
for i in sub:
    if A<= i <= B:
        print(i)
Buggy code:
a, b, k = map(int, input().split())
r = range(a, b + 1)
for i in (set(r[:k]) | set(r[-k:])):
    print(i)

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

ax = [i for i in range(A,A+K)]
bx = [i for i in range(B-K+1,B+1)]

sum = sorted(list(set(ax + bx))) 

for i in sum:
    print(i)



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

if B-A > K:
    ax = [i for i in range(A,A+K)]
    bx = [i for i in range(B-K+1,B+1)]
    sum = sorted(list(set(ax + bx))) 
else:
    sum = [i for i in range(A,B+1)]

for i in sum:
    print(i)
Buggy code:
A,B,K=map(int,input().split())
li=[]  
for i in range(A,A+K):
  li.append(i)
for j in range(B-K,B+1):
  li.append(j)
ans=sorted(set(li))
for l in ans:
  if A<=l<=B:
    print(l)  

Fixed code:
A,B,K=map(int,input().split())
li=[]  
for i in range(A,A+K):
  li.append(i)
for j in range(B-K+1,B+1):
  li.append(j)
ans=sorted(set(li))
for l in ans:
  if A<=l<=B:
    print(l)
Buggy code:

C = list(int(i) for i in input().split())
A = []
B = []
D = []
for i in range(C[0], C[0]+C[2]):
    A.append(i)
for i in range(C[1]-C[2]+1, C[1]+1):
    B.append(i)
for i in range(C[2]):
    print(A[i])
for i in range(C[2]):
    if B[i] not in A:
        print(B[i])


Fixed code:
C = list(int(i) for i in input().split())
A = []
B = []
for i in range(C[0], C[0]+C[2]):
    if i in range(C[0], C[1]+1):
        A.append(i)
for i in range(C[1]-C[2]+1, C[1]+1):
    if i in range(C[0], C[1]+1):
        if i not in A:
            A.append(i)
A.sort
for i in range(len(A)):
    print(A[i])
Buggy code:
a,b,k=map(int,input().split())
ha=[i for i in range(a,a+k) if i<=b]
o=[i for i in range(b,b-k,-1) if i>=a]
wa=set(ha+o)
for i in wa:
    print(i)

Fixed code:
a,b,k=map(int,input().split())
ha=[i for i in range(a,a+k) if i<=b]
o=[i for i in range(b,b-k,-1) if i>=a]
wa=set(ha+o)
wa=sorted(list(wa))
for i in wa:
    print(i)
Buggy code:
a,b,k=map(int,input().split())
lst=[]
for i in range(a,a+k):
  lst.append(i)
  print(i)
for j in range(b-k+1,b+1):
  if j not in lst:
    print(j)

Fixed code:
a,b,k=map(int,input().split())
lst=[]
for i in range(a,min(a+k, b)):
  lst.append(i)
  print(i)
for j in range(max(a, b-k+1),b+1):
  if j not in lst:
    print(j)
Buggy code:
def main():
    a, b, k = map(int, input().split())

    ans = set()

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

        y = b - i
        if a <= y:
            ans.add(y)

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


def main2():
    a, b, k = map(int, input().split())
    ans = []
    if 2 * k < b - a + 1:
        for i in range(k):
            ans.append(a + i)
            ans.append(b - i)
    else:
        for i in range(a, b + 1):
            ans.append(i)

    for i in ans:
        print(i)



if __name__ == '__main__':
    main2()


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

    ans = set()

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

        y = b - i
        if a <= y:
            ans.add(y)

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


def main2():
    a, b, k = map(int, input().split())
    ans = []
    if 2 * k <= b - a + 1:
        for i in range(k):
            ans.append(a + i)
            ans.append(b - i)
    else:
        for i in range(a, b + 1):
            ans.append(i)

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


if __name__ == '__main__':
    main2()
Buggy code:
A, B, K =map(int,input().split())

if B-A < K:
  for i in range(A, B):
    print(i)
else:
  C = []
  for i in range(A, A+K):
    C.append(i)
  
  D = []  
  for i in range(B, B-K, -1) :
    D.append(i)

E = set(C) | set(D)
F = sorted(E)
print(F)


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

if B-A <= K:
  for i in range(A, B+1):
    print(i)
else:
  C = []
  for i in range(A, A+K):
    C.append(i)
  
  D = []  
  for i in range(B, B-K, -1) :
    D.append(i)
    
  E = set(C) | set(D)
  F = sorted(E)
  
  for i in range(len(F)):
      print(F[i])
Buggy code:
A, B, K = list(map(int, input().split()))

if abs(A-B)<K:
    for i in range(A, B+1):
        print(i)
else:
    x = {i for i in range(A, A+K)}
    y = {j for j in range(B-K+1, B+1)}
    z = x | y
    z = sorted(list(z))
    print(z)
    for a in z:
        print(a)

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

if abs(A-B)<K:
    for i in range(A, B+1):
        print(i)
else:
    x = {i for i in range(A, A+K)}
    y = {j for j in range(B-K+1, B+1)}
    z = x | y
    z = sorted(list(z))
    for a in z:
        print(a)
Buggy code:
import sys
P = []
A,B,K = map(int, input().split())
for i in range(A,min(B,A+K-1)):
  print(i)
  P.append(i)
for i in range(min(B,abs(B-K+1)),B+1):
  if i not in P:
    print(i)

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

for i in range(A,min(B,A+K)):
  print(i)
  P.append(i)
for i in range(max(A,B-K+1),B+1):
  if i not in P:
    print(i)
Buggy code:
a, b, k = map(int, input().split())

if (b - a)  < k * 2:
    for i in range(a, b+1):
        print(i)
    exit()
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)  < k * 2:
    for i in range(a, b+1):
        print(i)
    exit()
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(a,a+k):
    if i <= b:
        ans.append(i)
for i in range(b-k+1,b+1):
    if i not in ans and i > a+k:
        ans.append(i)
for i in range(len(ans)):
    print(ans[i])

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

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

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

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



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

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

result = list(minset | maxset)
result.sort()
for i in result:
    if int_a <= i <= int_b:
        print(i)
Buggy code:
A, B, K = map(int, input().split())
for i in range(K):
    if A+i <= B:
        print(A+i)
if B-K+1 > A:
    for j in range(K):
        print(B-K+1+j)

Fixed code:
A, B, K = map(int, input().split())
for i in range(K):
    if A+i <= B:
        print(A+i)
for j in range(K):
    if B-K+1+j > A+K-1:
        print(B-K+1+j)
Buggy code:
def main():
    A, B, K = (int(i) for i in input().split())
    result = set()
    A_min = min(A+K, B)
    B_max = max(A, B-K)
    for i in range(A, A_min):
        result.add(i)
    for j in range(B_max, B+1):
        result.add(j)

    for i in sorted(result):
        print(i)
if __name__ == '__main__':
    main()

Fixed code:
def main():
    A, B, K = (int(i) for i in input().split())
    result = set()
    A_min = min(A+K-1, B)
    B_max = max(A, B-K+1)
    for i in range(A, A_min+1):
        result.add(i)
    for j in range(B_max, B+1):
        result.add(j)
    for i in sorted(result):
        print(i)


if __name__ == '__main__':
    main()
Buggy code:
A, B, K = map(int, input().split())

L = list(range(1, K+1)) + list(range(B-K+1, B+1))
L_no_duplication = set(L)
print(*sorted(L_no_duplication), sep="\n")

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

L = list(range(A, min(B, A+K))) + list(range(max(A, B-K+1), B+1))
L_no_duplication = set(L)
print(*sorted(L_no_duplication), sep="\n")
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 = sorted(lis(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())
ans=[]
num_min=a+k
num_max=b-k+1
if b-a+1<=2*k:
    for i in range(a,num_min):
        ans.append(i)
    for i in range(num_max,b+1):
        ans.append(i)
else:
    for i in range(a,b+1):
        ans.append(i)
ans=sorted(set(ans))
for i in ans:
    print(i)

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

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


Fixed code:
a,b,k = map(int, input().split())
for i in range (k):
  if a + i <= b-k:
    print(str(a+i))
for i in range (k):
  if a <= b+1-k+i: 
    print(str(b+1-k+i))
Buggy code:
A, B, K = map(int, input().split())
if K > B-A:
    ans = list(range(A, A+1))
else:
    ans = list(range(A, A+K)) + list(range(B, B - K, -1))
ans.sort()
print(*ans, sep='\n')

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

if b-a+1>2*c:
	x=[i for i in range(a,a+c)]
	y=[i for i in range(b-c,b)]
	e=x+y
else:
	e=[i for i in range(a,b+1)]
#print(e)
for i in e:
	print(i)


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

if b-a+1>2*c:
	x=[i for i in range(a,a+c)]
	y=[i for i in range(b-c+1,b+1)]
	e=x+y
else:
	e=[i for i in range(a,b+1)]
#print(e)
for i in e:
	print(i)
Buggy code:
a,b,k = [int(i) for i in input().split()]
if a + b - 1 <= b:
    for i in range(a,a+k):
        print(i)
    if b-a+1>=2*k:
        for i in range(b-k+1,b+1):
            print(i)
    else:
        for i in range(a+k,b+1):
            print(i)
else:
    for i in range(a,b+1):
        print(i)
            

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

Fixed code:
A,B,K=map(int,input().split())
ans=[]
for i in range(A,A+K):
    if A<=i<=B:
        ans.append(i)
    else:
        break
for t in range(B-K+1,B+1):
    if A<=t<=B: 
        ans.append(t)
    else:
        break
for z in sorted(set(ans)):
    print(z)
Buggy code:
A, B, K = list(map(int, input().split()))
left = set(list(range(A, A + K)))
right = set(list(range(B - K + 1, B + 1)))
[print(i) for i in sorted(list((left | right)))]


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

Fixed code:
a, b, k = map(int, input().split())
if 2*k >= b-a+1:
     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())
ans = []

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

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

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

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

for i in sorted(set(ans)):
    print(i)
Buggy code:
A, B, K = map(int, input().split())
anslist = []
for i in range(0, K):
	if A+i in anslist or B < A+i:
		break
	if B-i in anslist or B-i < A:
		break
	anslist.append(A+i)
	anslist.append(B-i)
anslist.sort()
for i in range(0, len(anslist)):
	print(anslist[i])

Fixed code:
A, B, K = map(int, input().split())
anslist = []
for i in range(0, K):
	if A+i in anslist or B < A+i:
		break
	anslist.append(A+i)
	if B-i in anslist or B-i < A:
		break
	anslist.append(B-i)
anslist.sort()
for i in range(0, len(anslist)):
	print(anslist[i])
Buggy code:
a,b,k=map(int,input().split())
atmp=a; btmp=b;
ans=set()

for i in range(1,k+1):
    ans.add(atmp)
    atmp+=1
    if atmp>b:
        break

for i in range(1,k+1):
    ans.add(btmp)
    btmp-=1
    if btmp<a:
        break

print(sorted(ans))

Fixed code:
a,b,k=map(int,input().split())
atmp=a; btmp=b;
ans=set()

for i in range(1,k+1):
    ans.add(atmp)
    atmp+=1
    if atmp>b:
        break

for i in range(1,k+1):
    ans.add(btmp)
    btmp-=1
    if btmp<a:
        break

ans=sorted(ans)
for i in range(len(ans)):
    print(ans[i])
Buggy code:
a,b,k =map(int, input().split())
c=list(range(a,a+k))
d=list(range(b-k+1,b+1))
e=set(c+d)
for i in e:
    if a<=i<=b:
        print(i)

Fixed code:
a,b,k =map(int, input().split())
c=list(range(a,a+k))
d=list(range(b-k+1,b+1))
e=list(set(c+d))
e.sort()
for i in e:
    if a<=i<=b:
        print(i)
Buggy code:
a, b, k = map(int, input().split())

s = set()
for i in range(a, a+k):
    if a <=  i <= b:
        s.add(i)
for i in range(b-k, b+1):
    if a <=  i <= b:
        s.add(i)
for i in s:
    print(i)

Fixed code:
a, b, k = map(int, input().split())
s = set()
for i in range(a, a+k):
    if a <=  i <= b:
        s.add(i)
for i in range(b-k+1, b+1):
    if a <=  i <= b:
        s.add(i)
for i in sorted(s):
    print(i)
Buggy code:
A, B, K = list(map(int,input().split(' ')))
'''
x = [i for i in range(A,B+1)]
s_f,s_b = x[:K],x[len(x)-K:]
ans = s_f + s_b
ans =list(set(ans))
#ans.sort()

'''
if len(range(A,B+1))<100:
  [print(i) for i in range(A,B+1)]
else:
  s_f = [i for i in range(A,A+K)]
  s_b = [i for i in range(B-K+1,B+1)]
  ans = s_f + s_b
  ans =list(set(ans))
  ans.sort()
  [print(i) for i in ans]

  
  
       

Fixed code:
A, B, K = list(map(int,input().split(' ')))
'''
x = [i for i in range(A,B+1)]
s_f,s_b = x[:K],x[len(x)-K:]
ans = s_f + s_b
ans =list(set(ans))
#ans.sort()
if len(range(A,B+1))<K:
  [print(i) for i in range(A,B+1)]
else:
  x = [i for i in range(A,B+1)]
  s_f,s_b = x[:K],x[len(x)-K:]
  ans = s_f + s_b
  ans =list(set(ans))
  ans.sort()
  [print(i) for i in ans]

'''
if (B-A+1)<K:
  s =  list(range(A,B+1))
  [print(i) for i in s]
else:           
  s_f = list(range(A,A+K))
  s_b = list(range(B,B-K,-1))
  ans = s_f + s_b
  ans =list(set(ans))
  ans.sort()
  [print(i) for i in ans]