qyliang/CodeNanoFix huggingface dataset:
Buggy code:
inData = int(input())

seqData = list(range(1,inData+1,1))
outData = [0] * inData
for thisData in seqData:
    if thisData == inData:
        if thisData%3 == 0 or thisData%10==3:
            print(" "+str(thisData))
        else:
            for i in range(5):
                i=i+1
                over =  10 ** i
                tmp = thisData/over
                if int(tmp % 10) == 3:
                    print(" "+str(thisData))
                    break
                else:
                    pass:
    else:
        if thisData%3 == 0 or thisData%10==3:
            print(" "+str(thisData), end = "")
        else:
            for i in range(5):
                i=i+1
                over =  10 ** i
                tmp = thisData/over
                if int(tmp % 10) == 3:
                    print(" "+str(thisData), end = "")
                    break
                else:
                    pass


Fixed code:
inData = int(input())

seqData = list(range(1,inData+1,1))
outData = [0] * inData
for thisData in seqData:
    if thisData == inData:
        if thisData%3 == 0 or thisData%10==3:
            print(" "+str(thisData))
        else:
            for i in range(5):
                i=i+1
                over =  10 ** i
                tmp = thisData/over
                if int(tmp % 10) == 3:
                    print(" "+str(thisData))
                    break
                else:
                    pass
            print("")
    else:
        if thisData%3 == 0 or thisData%10==3:
            print(" "+str(thisData), end = "")
        else:
            for i in range(5):
                i=i+1
                over =  10 ** i
                tmp = thisData/over
                if int(tmp % 10) == 3:
                    print(" "+str(thisData), end = "")
                    break
                else:
                    pass
Buggy code:
n = int(input())
i = 1

while i <= n:
	
	x = i
	
	if x % 3 == 0:
		print(" ", end ="")
		print(i, end ="")
		
	while x != 0:
		if x % 10 == 3:
			print(" ", end ="")
			print(i, end ="")
			break
		else:
			x = int(x / 10)
			
	i += 1
print()

Fixed code:
n = int(input())
i = 1

while i <= n:
	
	x = i
	
	if x % 3 == 0:
		print(" ", end ="")
		print(i, end ="")
	else:
		while x != 0:
			if x % 10 == 3:
				print(" ", end ="")
				print(i, end ="")
				break
			else:
				x = int(x / 10)
			
	i += 1
print()
Buggy code:
def nabeatsu(a):
    if a % 3 == 0:
        return True

    while a != 0:
        if a % 10 == 3:
            return True

        a //= 10

    return False

def main():
    n = int(input())

    for i in range(1,n+1):
        if nabeatsu(i):
            print("  {0}".format(i),end="")

if __name__ == "__main__":
    main()

Fixed code:
def call(a):
    if a % 3 == 0:
        return True

    while a != 0:
        if a % 10 == 3:
            return True

        a //= 10

    return False

def main():
    n = int(input())

    for i in range(1, n + 1):
        if call(i):
            print(" {0}".format(i), end="")

    print("")

if __name__ == "__main__":
    main()
Buggy code:
import math

x = int(input())
for i in range(x+1):
    if i%3==0:
        print(f" {i}",end="")
        continue
    r=i
    while True:
        if r<=0:
            break
        if r%10==3:
            print(f" {i}",end="")
            break
        r//=10
print("")



Fixed code:
import math

x = int(input())
for i in range(1,x+1):
    if i%3==0:
        print(f" {i}",end="")
        continue
    r=i
    while True:
        if r<=0:
            break
        if r%10==3:
            print(f" {i}",end="")
            break
        r//=10
print("")
Buggy code:
n = int(input())
list = [' ']
for i in range(n+1):
    if i % 3 == 0 or "3" in str(i):
        list.append(i)

print(*list)

Fixed code:
n = int(input())
list = []
for i in range(3,n+1):
    if i % 3 == 0 or "3" in str(i):
        list.append(i)
print(end = ' ')
print(*list)
Buggy code:
i = int(input())
for n in range(1,i+1):
    if (n%3==0):
        print(' {}'.format(n),end='') # 개행하면 안되기 때문
    else:
        x = i
        while x:
            print(' {}'.format(x),end='')
            x //= 10
            break
print()


Fixed code:
i = int(input())
for n in range(1,i+1):
    if (n%3==0):
        print(' {}'.format(n),end="") # 개행하면 안되기 때문
    else:
        x = n
        while(x>0):
            if (x%10 == 3):
                print(' {}'.format(n),end="")
                break
            else:
                x = x//10
print()
Buggy code:
n = int(input())
print('',' '.join([str(x) for x in range(1,n+1) if n%3==0 or '3' in str(x)]))

Fixed code:
print('',' '.join([str(x) for x in range(1,int(input())+1) if x % 3==0 or '3' in str(x)]))
Buggy code:
n=int(input())
i=1
while i<=n :
    x=i
    if x%3==0  :
        print("",i,end="")
        i=i+1
    else:
        if x%10==3 :
            print("",i,end="")
            i=i+1
        else :
            x=x//10
            if x>=1 :
                if x % 10 ==3 :
                    print("",i,end="")
    i=i+1

Fixed code:
n=int(input())
i=1
while i<=n :
    x=i
    if x%3==0  :
        print("",i,end="")
    else:
        if x%10==3 :
            print("",i,end="")
        else :
            while 0<x :
                f=0
                x=x//10
                if x>=1 :
                    if x % 10 ==3 :
                        print("",i,end="")
                        f=1
                if f==1:
                    break
    i=i+1
print("")
Buggy code:
def func(n):
    i = 1
    dst = ""

    def include3(x, i):
        local_dst = ""

        if x % 10 == 3:
            local_dst += " " + str(i)
        else:
            if x // 10:
                local_dst += include3(x // 10, i)

        return local_dst

    while i <= n:
        x = i
        if x % 3 == 0:
            dst += " " + str(i)
        else:
            dst += include3(x, i)
        i += 1

    return dst


print(func(int(input())).split())

Fixed code:
def func(n):
    i = 1
    dst = ""

    def include3(x, i):
        local_dst = ""

        if x % 10 == 3:
            local_dst += " " + str(i)
        else:
            if x // 10:
                local_dst += include3(x // 10, i)

        return local_dst

    while i <= n:
        x = i
        if x % 3 == 0:
            dst += " " + str(i)
        else:
            dst += include3(x, i)
        i += 1

    return dst

print(func(int(input())))
Buggy code:
n = int(input())
for i in range(n):
    if (i+1)%3 == 0 or (i+1)%10 == 0:
        print(" " + str(i+1), end='')
print()

Fixed code:
n = int(input())
for i in range(n):
    if (i+1)%3 == 0 or "3" in str(i+1):
        print(" " + str(i+1), end='')
print()
Buggy code:
n = int(input())
for i in range(1 , n+1):
	if i > n:
		break
	if i % 3 == 0:
		print(" {}".format(i), end="")
	else:
		if {i % 10 == 3}:
			print(" {}".format(i), end="")
print()



Fixed code:
n=int(input())

for i in range(n):
  if (i+1)%3==0:
    print(" {}".format(i+1), end="")
  else:
    j = i+1
    while j > 0:
      if j%10 == 3:
        print(" {}".format(i+1), end="")
        break
      else:
        j = j//10

print("")
Buggy code:
#!usr/bin/env python3

import sys


def int_fetcher():
    num = int(sys.stdin.readline())
    return num


def call(num):
    res = ''
    for i in range(1, num+1):
        x = i
        if x % 3 == 0 or x % 10 == 3:
            res += ' ' + str(i)
            print('Added: %d' % i)
            continue
        while x:
            if x % 10 == 3:
                res += ' ' + str(i)
                print('Added 2: %d' % i)
                break
            x //= 10
            print('incremented x: %d' % x)
    return res


def main():
    print(call(int_fetcher()))


if __name__ == '__main__':
    main()

Fixed code:
#!usr/bin/env python3

import sys


def int_fetcher():
    num = int(sys.stdin.readline())
    return num


def call(num):
    res = ''
    for i in range(1, num+1):
        x = i
        if x % 3 == 0 or x % 10 == 3:
            res += ' ' + str(i)
            continue
        while x:
            if x % 10 == 3:
                res += ' ' + str(i)
                break
            x //= 10
    return res


def main():
    print(call(int_fetcher()))


if __name__ == '__main__':
    main()
Buggy code:
n = int(input())
for i in range(1, n+1):
    if i % 3 == 0:
        print(' '+str(i))
    elif '3' in str(i):
        print(' '+str(i))

Fixed code:
n = int(input())
for i in range(1, n+1):
    if i % 3 == 0:
        print(' '+str(i), end='')
    elif '3' in str(i):
        print(' '+str(i), end='')
print('')
Buggy code:
def threeDivCheck(x):
  if x % 3 == 0: return x
  return 0

def threeIncludeCheck(x):
  y = x
  while y!=0:
    if y%10 == 3:
      return x
    y/=10
  return 0

def main():
  n = int(input())
  p = 0
  for i in range(n+1):
    p = threeDivCheck(i)
    if p:
      print(' {}'.format(p), end='')
    else:
      p=threeIncludeCheck(i)
      if p:
        print(' {}'.format(p), end='')

Fixed code:
def threeDivCheck(x):
  if x % 3 == 0: return x
  return 0

def threeIncludeCheck(x):
  y = x
  while y!=0:
    if y%10 == 3:
      return x
    y=int(y/10)
  return 0

def main():
  n = int(input())
  p = 0
  for i in range(n+1):
    p = threeDivCheck(i)
    if p:
      print(' {}'.format(p), end='')
    else:
      p=threeIncludeCheck(i)
      if p:
        print(' {}'.format(p), end='')
  print()

main()
Buggy code:
num = int(input())
for i in range(0,num+1):
    if i % 3 == 0 or '3' in str(i):
        print(' {}'.format(i),end="")
print();    
       

Fixed code:
num = int(input())
for i in range(1,num+1):
    if i % 3 == 0 or '3' in str(i):
        print(' {}'.format(i),end="")
print();
Buggy code:
n=int(input())
a,c,i=[],0,1
while i <= n:
    if c==0:
        x=i
        if x%3==0:
            print(' '+i, end='')
            i+=1
            continue
    c=0
    if x%10==3:
        print(' '+i, end='')
        i+=1
        continue
    x//=10
    if x == 0:
        i+=1
        continue
    else:
        c=1
print()

Fixed code:
n=int(input())
a,c,i=[],0,1
while i <= n:
    if c==0:
        x=i
        if x%3==0:
            print(' '+str(i), end='')
            i+=1
            continue
    c=0
    if x%10==3:
        print(' '+str(i), end='')
        i+=1
        continue
    x//=10
    if x == 0:
        i+=1
        continue
    else:
        c=1
print()
Buggy code:
n=int(input())
m=[]
for i in range(1,n+1):
 a=i
 if a%3==0:
  m.append(i)
  continue
 while a>0:
  if a%10==3:
   m.append(i)
   break
  a/=10
print(' '+*m)

Fixed code:
n=int(input())
m=[]
for i in range(1,n+1):
 a=i
 if a%3==0:
  m.append(i)
  continue
 while a>0:
  if a%10==3:
   m.append(i)
   break
  a//=10
print(' ',end='')
print(*m)
Buggy code:
print(' '+*[i for i in range(3,int(input())+1)if i%3==0 or '3' in str(i)])

Fixed code:
print('',*[i for i in range(3,int(input())+1)if i%3==0 or '3' in str(i)])
Buggy code:
n = int(input())
ans = ''
for i in range(1, n+1):
 if i%3 == 0:
  ans += " " + str(i)
 elif i%10 == 3:
  ans += " " + str(i)
 div = i
 while div//10:
  div = div//10
  if div%10 == 3:
   ans += " " + str(i)
   div = 0
print(ans)

Fixed code:
n = int(input())
ans = ''
for i in range(1, n+1):
 if i%3 == 0:
  ans += " " + str(i)
 elif i%10 == 3:
  ans += " " + str(i)
 else:
  div = i
  while div//10:
   div = div//10
   if div%10 == 3:
    ans += " " + str(i)
    div = 0
print(ans)
Buggy code:
n = int(input())
result = ''
for i in range(1, n+1):
    if (i % 3 == 0) or (i // 10 == 3):
        result += (' ' + str(i))
print(result)

Fixed code:
n = int(input())
result = ''
for i in range(3, n+1):
    if (i % 3 == 0) or (i % 10 == 3) or ('3' in str(i)):
        result += (' ' + str(i))
print(result)
Buggy code:
n = int(input())
i = 1
ret = ""
while True:
    x = i
    if  x % 3 == 0:
        ret += " " + str(i)
    elif x % 10 == 3:
        ret += " " + str(i)
    else:
        x /= 10
        while x > 0:
            if x % 10 == 3:
                ret += " " + str(i)
                x /= 10
                if x == 0:
                    break
    i+=1
    if i > n:
        break

print(ret)



Fixed code:
n = int(input())
i = 1
ret = ""
while True:
    x = i
    if  x % 3 == 0:
        ret += " " + str(i)
    elif x % 10 == 3:
        ret += " " + str(i)
    else:
        x //= 10
        while x != 0:
            if x % 10 == 3:
                ret += " " + str(i)
                break
            x //= 10
    i+=1
    if i > n:
        break

print(ret)
Buggy code:
n = int(input())

for i in range(1,n+1):
    if (i % 3) == 0:
        print(" ", i, end="")
        continue
    x = i
    while x > 0:
        if (x % 10) == 3:
            print(" ", i, end="")
            break
        x //= 10

print("")

Fixed code:
n = int(input())

for i in range(1,n+1):
    if (i % 3) == 0:
        print(" " + str(i), end="")
        continue
    x = i
    while x > 0:
        if (x % 10) == 3:
            print(" " + str(i), end="")
            break
        x //= 10

print()
Buggy code:
from sys import stdin

stdin.readline().rstrip()
a = [int(x) for x in stdin.readline().rstrip().split()]
a.sort(reverse=True)
print(*a)



Fixed code:
from sys import stdin

stdin.readline().rstrip()
a = [int(x) for x in stdin.readline().rstrip().split()]
a.reverse()
print(*a)
Buggy code:
n = input()
a = [int(x) for x in input().split(" ")]
a.sort(reverse=True)
print(" ".join([str(b) for b in a]))

Fixed code:
n = input()
a = [int(x) for x in input().split(" ")]
a.reverse()
print(" ".join([str(b) for b in a]))
Buggy code:
a = list(map(int, input().split()))
a.reverse()
a = list(map(str,a))
print(" ".join(a))

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

lst.reverse()

print(" ".join(map(str, lst)))
Buggy code:
import sys

length = int(sys.stdin.readline())
num_seq = [ int(num) for num in sys.stdin.readline().split() ]
print(num_seq)

for i in range(1,length):
    print(num_seq[length - i],end='')
    print(' ',end='')
print(num_seq[0],end='')


Fixed code:
import sys

length = int(sys.stdin.readline())
num_seq = sys.stdin.readline().split()

for i in range(1, length):
    print(num_seq[length - i], end=' ')
print(num_seq[0])
Buggy code:
input()
print(" ".join(input().split()[::-1])

Fixed code:
input()
print(" ".join(input().split()[::-1]))
Buggy code:
cnt = int(input())
li = list(map(int,input().split()))
re_li = li[::-1]
print(' '.join(map(int,re_li)))



Fixed code:
cnt = int(input())
li = list(map(int,input().split()))
re_li = li[::-1]
print(' '.join(map(str,re_li)))
Buggy code:
n = int(input())
a = map(int, input().split())

for i in range(1, n):
    print(str(a[-i]) + " ", end="")
print(a[0])

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

for i in range(1, n):
    print(str(a[-i]) + " ", end = "")
print(a[0])
Buggy code:
N = int(input())
n = [int(i) for i in input().split()]

n.sort()
n.reverse()

result = map(str, n)
result = " ".join(result)
print(result)


Fixed code:
N = int(input())
n = [int(i) for i in input().split()]

n.reverse()

result = map(str, n)
result = " ".join(result)
print(result)
Buggy code:
a = list(map(int, input().split()))
a.reverse()
sum = ""
for i in a:
	sum = sum + str(i) + " "
print(sum[:-1])

Fixed code:
input()
a = list(map(int, input().split()))
a.reverse()
sum = ""
for i in a:
	sum = sum + str(i) + " "
print(sum[:-1])
Buggy code:
num = int(input())
data = list(map(int, input().split()))

lengh = len(data)
for tmp in range(lengh):
	if tmp == lengh-1:
		print(data.pop(-1))
	else:
		print(data.pop(-1), end="")


Fixed code:
num = int(input())
data = list(map(int, input().split()))

lengh = len(data)
for tmp in range(lengh):
	if tmp == lengh-1:
		print(data.pop(-1))
	else:
		print(data.pop(-1), end=" ")
Buggy code:
nums = list(map(int, input().split()))

print(nums[-1], end="")
for i in range(len(nums)-2, -1, -1):
    print(" {0}".format(nums[i]), end="")

Fixed code:
l = int(input())
nums = list(map(int, input().split()))

print(nums[-1], end="")
for i in range(l-2, -1, -1):
    print(" {0}".format(nums[i]), end="")
print("")
Buggy code:
n = int(input())
num = list(map(int, input().split()))

if n == 1:
    print(num[0])
else:
    counter = 0
    for i in (reversed(num)):
        if counter == 0:
            print(i, end="")
        elif counter == n-1:
            print(" {}".format(i))
        else:
            print(" {}".format(i), end="")
            counter += 1


Fixed code:
n = int(input())
num = list(map(int, input().split()))

if n == 1:
    print(num[0])
else:
    counter = 0
    for i in (reversed(num)):
        if counter == 0:
            print(i, end="")
        elif counter == n-1:
            print(" {}".format(i))
        else:
            print(" {}".format(i), end="")
        counter += 1
Buggy code:
A = [i for i in input().split()]
A.reverse()
print(' '.join(A))

Fixed code:
n = input()
A = [i for i in input().split()]
A.reverse()
print(' '.join(A))
Buggy code:
input()
A = [i for i in input().split()]
A.reverse()
print(' '.join(A))a

Fixed code:
input()
A = [i for i in input().split()]
A.reverse()
print(' '.join(A))
Buggy code:
n=int(input())
a=list(map(int,input().split()))
a=a[::-1]
print(" ".join(a))

Fixed code:
n=int(input())
a=list(map(str,input().split()))
a=a[::-1]
print(" ".join(a))
Buggy code:
n = int(input())
a = list(map(int,input().split()))

a.reverse()
for i in range(len(a)):
	if i!=len(a)-1:
		print(a[i])
	else:
		print(a[i],end=' ')


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

a.reverse()
for i in range(len(a)):
	if i!=len(a)-1:
		print(a[i],end=' ')
	else:
		print(a[i])
Buggy code:
n = int(input())
list = [i for i in input().split()].reverse()
print(" ".join(list))

Fixed code:
n = int(input())
list = [i for i in input().split()]
list.reverse()
print(" ".join(list))
Buggy code:
n = input()
a = [int(x) for x in input().split()]
a = sorted(a, reverse=True)
print(" ".join(map(str, a)))

Fixed code:
n = input()
a = [int(x) for x in input().split()]
a.reverse()
print(" ".join(map(str, a)))
Buggy code:
n = int(input())
a = list(map(int, input().split()))
b = []
count = 0
for i in a:
    count += 1
    b.append(a[n-count])
print(b)
print(" ".join(map(str, b)))



Fixed code:
n = int(input())
a = list(map(int, input().split()))
b = []
count = 0
for _ in a:
    count += 1
    b.append(a[n-count])
print(" ".join(map(str, b)))
Buggy code:
n=int(input())
l=list(map(int,input().split()))
l.reverse()
print( ','.join(list(map( lambda x: str(x), l ))) )


Fixed code:
n=int(input())
l=list(map(int,input().split()))
l.reverse()
print( ' '.join(list(map( lambda x: str(x), l ))) )
Buggy code:
n = int(input())
a = str(input())
list = a.split()
for i in list[4:0:-1]:
    print(i, end = ' ')
print(list[0])


Fixed code:
n = int(input())
a = str(input())
list = a.split()
for i in list[n:0:-1]:
    print(i, end = ' ')
print(list[0])
Buggy code:
import sys


def main():
    sys.stdin.readline()
    list1 = list(map(str, sys.stdin.readline().split()))
    list.sort(list1, reverse=True)
    print(' '.join(list1))
    return


if __name__ == '__main__':
    main()



Fixed code:
import sys


def main():
    sys.stdin.readline()
    list1 = list(map(str, sys.stdin.readline().split()))
    list.reverse(list1)
    print(' '.join(list1))

    return


if __name__ == '__main__':
    main()
Buggy code:
bb = []
input()
aa = [ int(i) for i in input().split()]
aa.sort()
for kk in aa[::-1]:
	bb.append(kk)
print(' '.join(map(str, bb))) #map(func, iterable)

Fixed code:
bb = []
input()
aa = [ int(i) for i in input().split()]
for kk in aa[::-1]:
	bb.append(kk)
print(' '.join(map(str, bb))) #map(func, iterable)
Buggy code:
n = int(input))
print(" ".join(list(map(int, input().split()))[::-1]))


Fixed code:
n = int(input())
a = list(map(str, input().split()))
print(" ".join(a [::-1]))
Buggy code:
a = list(map(int, input().split()))
a = list(a[i] for i in range(len(a)-1,-1,-1))
print(" ".join(map(str, a)))

Fixed code:
_ = input()
a = list(map(int, input().split()))
a = list(a[i] for i in range(len(a)-1,-1,-1))
print(" ".join(map(str, a)))
Buggy code:
input()
print(''.join(input().split()[::-1]))


Fixed code:
input()
print(' '.join(input().split()[::-1]))
Buggy code:
n = int(input())
n_list = [int(i) for i in input().split(" ")]
n_list.reverse()
print(' '.join(map(str, a)))

Fixed code:
n = int(input())
n_list = [int(i) for i in input().split(" ")]
n_list.reverse()
print(' '.join(map(str, n_list)))
Buggy code:
n = input()
numbers = input().split()
print(''.join(numbers[::-1]))

Fixed code:
n = input()
numbers = input().split()
print(' '.join(numbers[::-1]))
Buggy code:
numbers = list(input().split())
print(" ".join(numbers[::-1]))

Fixed code:
n = input()
numbers = list(input().split())
print(" ".join(numbers[::-1]))
Buggy code:
n = int(input())
memo = input().split()
for i in range(n-1):
    print(memo[n - i - 1]+" ")
print(memo[0])

Fixed code:
n = int(input())
memo = input().split()
for i in range(n-1):
    print(memo[n - i - 1]+" ",end="")
print(memo[0])
Buggy code:
n=int(input())
a=list(map(int,input().split()))
for i in range(n-1) :
    print("{} ".format(a[n-i]),end="")
print("{}".format(a[0]))


Fixed code:
n=int(input())
a=list(map(int,input().split()))
for i in range(n-1) :
    print("{} ".format(a[n-i-1]),end="")
print("{}".format(a[0]))
Buggy code:
x = int(input())
y = [int(i) for i in input().split()]
print("{0}".format(x),end='')
for i in range(x-2, 0-1, -1):
    print(' {0}'.format(y[i]), end='')

Fixed code:
x = int(input())
y = [int(i) for i in input().split()]
print("{0}".format(y[-1]),end='')
for i in range(x-2, 0-1, -1):
    print(' {0}'.format(y[i]), end='')
print()
Buggy code:
n=int(input())
print(*list(reversed(map(int, input().split()))))

Fixed code:
n=int(input())
print(*list(map(int, reversed(input().split()))))
Buggy code:
input()
l = [int(i) for i in input().split()]
l.sort()
print(" ".join(map(str,l[::-1])))
print()

Fixed code:
input()
l = [int(i) for i in input().split()]
print(" ".join(map(str,l[::-1])))
Buggy code:
a=list(map(int, input().split()))
a.reverse()
print(*a)


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

a.reverse()
print(*a)
Buggy code:
ns = list(map(int, input().split()))


print(*ns[::-1])


Fixed code:
ns = int(input()) #
ns = list(map(int, input().split()))


print(*ns[::-1])
Buggy code:
'''
ITP-1_6-A
 ??°???????????¢
?????????????????°???????????????????????????????????°?????????????????????????????????
???Input
??\????????\????????¢?????§?????????????????????
n
a1 a2 . . . an
n ?????°????????????????????????ai ??? i ???????????°?????¨????????????
???Output
???????????°?????????????????????????????????????????°??????????´??????????????????????????????\???????????????
??????????????°????????????????????\??????????????¨?????¨????????????????????????
'''
# import
import sys

# ?????°??????????????????
## ??°????????????
cntData = int(input())
#inputData = map(int, input().split())
## ??°
inputData = input().split(" ")

# sort
inputData.sort(reverse=True)

# Output
print(" ".join(inputData))

Fixed code:
'''
ITP-1_6-A
 ??°???????????¢
?????????????????°???????????????????????????????????°?????????????????????????????????
???Input
??\????????\????????¢?????§?????????????????????
n
a1 a2 . . . an
n ?????°????????????????????????ai ??? i ???????????°?????¨????????????
???Output
???????????°?????????????????????????????????????????°??????????´??????????????????????????????\???????????????
??????????????°????????????????????\??????????????¨?????¨????????????????????????
'''
# import
import sys

# ?????°??????????????????
## ??°????????????
cntData = int(input())
#inputData = map(int, input().split())
## ??°
inputData = input().split(" ")

# sort
# inputData.sort(reverse=True)
inputData.reverse()

# Output
print(" ".join(inputData))
Buggy code:
n = int(input())
s = list(map(int, input().strip().split(' ')))
t = n // 2

for i in range(0, t):
    s[i], s[n - i] = s[n - i], s[i]

for i in range(0, len(s)):
    if i != len(s - 1):
        print(s[i], end=" ")
    else:
        print(s[i])



Fixed code:
n = int(input())
s = list(map(int, input().strip().split(' ')))
t = n // 2

for i in range(0, n // 2):
    s[i], s[n - i - 1] = s[n - i - 1], s[i]

for i in range(0, len(s)):
    if i != len(s) - 1:
        print(s[i], end=" ")
    else:
        print(s[i])