Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
nmk=input("").split(" ")
n=int(nmk[0])
m=int(nmk[1])
k=int(nmk[2])
listin=[-1]*n
listf=[]
listb=[]
for i in range(n):
    listf+=[[]]
    listb+=[[]]
for i in range(m):
    ab=input("").split(" ")
    a=int(ab[0])-1
    b=int(ab[1])-1
    listf[a]+=[b]
    listf[b]+=[a]
for i in range(k):
    ab=input("").split(" ")
    a=int(ab[0])-1
    b=int(ab[1])-1
    listb[a]+=[b]
    listb[b]+=[a]
s=-1
listff=[]

for i in range(n):
    if(listin[i]==-1):
        s+=1
        listin[i]=s
        listff+=[[i]]
        cnt=0
        
        while(len(listff[s])>cnt):
            for ii in listf[listff[s][cnt]]:
                if(listin[ii]==-1):
                    listin[ii]=s
                    listff[s]+=[ii]
                    
            cnt+=1
listans=[]

for i in range(n):
    
    listans+=[str(len(set(listff[listin[i]])-set(listb[i]))-1-len(listf[i]))]
print(" ".join(listans))

    



    
    


Fixed submission:
import numpy as np
from scipy.sparse.csgraph import connected_components
from scipy.sparse import csr_matrix

import sys
sys.setrecursionlimit(10**9)
n,m,k=[int(i) for i in input().split()]
frends_num=[0 for i in range(n)]
def make_frends(m,n):
    data=[1 for i in range(m)]

    row=[]
    col=[]
    for k in range(m):
        i,j=[int(l) for l in input().split()]
        new_i=min(i,j)-1
        new_j=max(i,j)-1
        row.append(new_i)
        col.append(new_j)
        frends_num[new_i]+=1
        frends_num[new_j]+=1
    frend_sparce_matrix=csr_matrix((data, (row, col)),shape=(n,n))
    return frend_sparce_matrix


frends=make_frends(m,n)
l,labels=connected_components(frends)
labels
labels=list(labels)

class Group:
    def __init__(self,labels):
        self.labels=labels
        self.group_num=[0 for i in range(l)]
        for i in labels:
            self.group_num[i]+=1
    def get_group_num(self,i):
        return self.group_num[self.labels[i]]

group=Group(labels)


def get_frend_num(i):
    return frends_num[i]


def make_block(k,n):
    block_num=[0 for i in range(n)]
    for p in range(k):
        i,j =[int(l)-1 for l in input().split()]
        new_i=min(i,j)
        new_j=max(i,j)
        if labels[new_i]==labels[new_j]:
            block_num[i]+=1
            block_num[j]+=1
    return block_num

block=make_block(k,n)

def get_block_num(i):
    return block[i]

ans=[]
for i in range(n):
    ans.append(str(group.get_group_num(i)-1-get_frend_num(i)-get_block_num(i)))
print(" ".join(ans))
Buggy python submission (verdict: Runtime Error):
n=int(input(""))
a=input("").split(" ")

for i in a:
    if(i%2==0):
        if(i%3!=0 and i%5!=0):
            print("DENIED")
            break
else:
    print("APPROVED")
    

Fixed submission:
n=int(input(""))
aa=input("").split(" ")
s=0
a=[]
for i in aa:
    a+=[int(i)]
for i in a:
    if(i%2==0):
        if(i%3!=0 and i%5!=0):
            s=1
if(s==0):
    print("APPROVED")
else:
    print("DENIED")
Buggy python submission (verdict: Runtime Error):
A = map(int, input().split())
for i in range(5):
	if (A[i] == 0):
		print(i+1)
        break


Fixed submission:
A = list(map(int, input().split()))

for i in range(5):
    if A[i] == 0:
        print(i + 1)
        break

Buggy python submission (verdict: Runtime Error):
import java.io.*;
import java.util.*;

public class five {
	static class InputReader {
		BufferedReader reader;
		StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream));
			tokenizer = null;
		}

		public String next() {
			if (tokenizer == null || !tokenizer.hasMoreTokens())
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			return tokenizer.nextToken();
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public void close() throws IOException {
			reader.close();
		}
	}

	public static void main(String[] args) throws IOException {
		InputReader f = new InputReader(System.in);
		PrintWriter out = new PrintWriter(System.out);

		for (int i = 1; i <= 5; i++) {
			if (f.nextInt() == 0) {
				System.out.println(i);
				break;
			}
		}
		
		f.close();
		out.close();
	}
}

Fixed submission:
A = list(map(int, input().split()))

for i in range(5):
    if A[i] == 0:
        print(i + 1)
        break
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input())
print(A * B)

Fixed submission:
A, B = map(int, input().split())
print(A * B)
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
heights = list(map(int, input().split()))
 
good = [True] * N
for m in range(0, M):
  A, B = [int(s)-1 for s in input.split()]
  if heights[A] >= heights[B]:
    good[B] = False
  elif heights[A] <= heights[B]:
    good[A] = False
    
count = 0
for obs in good:
  if obs: count += 1
    
print(count)

Fixed submission:
N, M = map(int, input().split())
heights = list(map(int, input().split()))
 
greatest = [0] * N
for m in range(0, M):
  A, B = [int(s)-1 for s in input().split()]
  greatest[A] = max(greatest[A], heights[B])
  greatest[B] = max(greatest[B], heights[A])
    
count = 0
for i in range(0, N):
    count += heights[i] > greatest[i]
    
print(count)

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
heights = list(map(int, input().split()))
 
good = [True] * N
for m in range(0, M):
  A, B = map(int, input().split())
  if heights[A - 1] > heights[B - 1]:
    good[B] = False
  elif heights[A - 1] < heights[B - 1]:
    good[A] = False
    
count = 0
for obs in good:
  if obs: count += 1
    
print(count)


Fixed submission:
N, M = map(int, input().split())
heights = list(map(int, input().split()))
 
greatest = [0] * N
for m in range(0, M):
  A, B = [int(s)-1 for s in input().split()]
  greatest[A] = max(greatest[A], heights[B])
  greatest[B] = max(greatest[B], heights[A])
    
count = 0
for i in range(0, N):
    count += heights[i] > greatest[i]
    
print(count)

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
heights = list(map(int, input().split()))
 
good = [True] * N
for m in range(0, M):
  A, B = map(int, input().split())
  if heights[A] > heights[B]:
    good[B] = False
  elif heights[A] < heights[B]:
    good[A] = False
    
count = 0
for obs in good:
  if obs: count += 1
    
print(count)


Fixed submission:
N, M = map(int, input().split())
heights = list(map(int, input().split()))
 
greatest = [0] * N
for m in range(0, M):
  A, B = [int(s)-1 for s in input().split()]
  greatest[A] = max(greatest[A], heights[B])
  greatest[B] = max(greatest[B], heights[A])
    
count = 0
for i in range(0, N):
    count += heights[i] > greatest[i]
    
print(count)

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input.split())
heights = list(map(int, input.split()))

good = [True] * N
for m in range(0, M):
  A, B = map(int, input.split())
  if A > B:
    good[B] = False
  elif A < B:
    good[A] = False
    
count = 0
for obs in good:
  if obs: count++
    
print(count)

Fixed submission:
N, M = map(int, input().split())
heights = list(map(int, input().split()))
 
greatest = [0] * N
for m in range(0, M):
  A, B = [int(s)-1 for s in input().split()]
  greatest[A] = max(greatest[A], heights[B])
  greatest[B] = max(greatest[B], heights[A])
    
count = 0
for i in range(0, N):
    count += heights[i] > greatest[i]
    
print(count)
Buggy python submission (verdict: Runtime Error):
K = int(input())
A, B = [int(s) for s in input().split()]
 
largest = B // K * K

print("OK" if largest >= a else "NG")

Fixed submission:
K = int(input())
A, B = [int(s) for s in input().split()]
 
largest = B // K * K
 
print("OK" if largest >= A else "NG")
Buggy python submission (verdict: Runtime Error):
S, W = [int(s) for s in input.split()]
if W >= S:
  print("unsafe")
else:
  print("safe")

Fixed submission:
S, W = [int(s) for s in input().split()]
if W >= S:
  print("unsafe")
else:
  print("safe")
Buggy python submission (verdict: Runtime Error):
A, B, C, D = [int(s) for s in input().split()]
turn = 0
while A > 0 and C > 0:
  if turn == 0:
    C -= B
    turn = 1
  else:
    A -= D
  	turn = 0
if A > 0:
  print("Yes")
else:
  print("No")

Fixed submission:
A, B, C, D = [int(s) for s in input().split()]
turn = 0
while A > 0 and C > 0:
  if turn == 0:
    C -= B
    turn = 1
  else:
    A -= D
    turn = 0
if A > 0:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Time Limit Exceeded):
A, B, C, D = [int(s) for s in input().split()]
turn = 0
while True:
  if A <= 0 and C > 0:
    print("No")
  elif A > 0 and C <= 0:
  	print("Yes")
  
  if turn == 0:
    A -= D
    turn = 1
  else:
    C -= B
    turn = 0

Fixed submission:
A, B, C, D = [int(s) for s in input().split()]
turn = 0
while A > 0 and C > 0:
  if turn == 0:
    C -= B
    turn = 1
  else:
    A -= D
    turn = 0
if A > 0:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input())
items = set()
for i in range(0, N):
  items.add(input())
return len(items)

Fixed submission:
N = int(input())
items = set()
for n in range(0, N):
  items.add(input())
print(len(items))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))

x = 1
for i in range(0,n):
    x *= a[i]

if x > 10**18:
    print(-1)
    exit()
print(x)


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

x = 1
a.sort()
for i in range(0,n):
    x *= a[i]
    if x > 10**18:
        print(-1)
        exit()

print(x)
Buggy python submission (verdict: Runtime Error):
X, N = input().split()
X = int(X)
N = int(N)

if N == 0:
    print(X)
    exit()

P = input().split()
for i in range(len(P)):
    P[i] = int(P[i])

if X not in P:
    print(X)
    exit()

flag_p = True
flag_n = True

abs_num = 0
abs_num_p = X + 1
abs_num_n = X - 1
while True:

    if abs_num_p in P:
        flag_p = True
    else:
        flag_p = False

    if abs_num_n in P:
        flag_n = True
    else:
        flag_n = False

    if(flag_p == True & flag_n == True):
        abs_num_p += 1
        abs_num_n -= 1
        continue;
    elif(flag_p == True & flag_n == False):
        print(abs_num_n)
        break;
    elif(flag_p == False):
        print(abs_num_p)
        break;


Fixed submission:
import numpy as np

X = np.array(input().split())

for i in range(len(X)):
    if (i+1) != int(X[i]):
        print(i+1)
        break;
Buggy python submission (verdict: Time Limit Exceeded):
X, N = input().split()
X = int(X)
N = int(N)

if N == 0:
    print(X)
    exit()

P = input().split()
for i in range(len(P)):
    P[i] = int(P[i])

if X not in P:
    print(X)
    exit()

flag_p = True
flag_n = True

abs_num = 0
abs_num_p = X + 1
abs_num_n = X - 1
while True:

    if abs_num_p in P:
        flag_p = True
    else:
        flag_p = False

    if abs_num_n in P:
        flag_n = True
    else:
        flag_n = False

    if(flag_p == True & flag_n == True):
        abs_num_p += 1
        abs_num_n -= 1
        continue;
    elif(flag_p == True & flag_n == False):
        print(abs_num_n)
        break;
    elif(flag_p == False):
        print(abs_num_p)
        break;


Fixed submission:
X, N = input().split()
X = int(X)
N = int(N)

if N == 0:
    print(X)
    exit()

P = input().split()
for i in range(len(P)):
    P[i] = int(P[i])

if X not in P:
    print(X)
    exit()


abs_num_p = X + 1
abs_num_n = X - 1
while True:

    if abs_num_p in P:
        flag_p = True
    else:
        flag_p = False

    if abs_num_n in P:
        flag_n = True
    else:
        flag_n = False
    if(  flag_p == True  and flag_n == True ):
        abs_num_p += 1
        abs_num_n -= 1
        continue;
    elif(flag_p == True  and flag_n == False):
        print(abs_num_n)
        break;
    elif(flag_p == False and flag_n == True ):
        print(abs_num_p)
        break;
    elif(flag_p == False and flag_n == False):
        print(abs_num_n)
        break;

    i += 1

Buggy python submission (verdict: Time Limit Exceeded):
X, N = input().split()
X = int(X)
N = int(N)

if N == 0:
    print(X)
    exit()

P = input().split()
for i in range(len(P)):
    P[i] = int(P[i])

if X not in P:
    print(X)

flag_p = True
flag_n = True

abs_num = 0
abs_num_p = X + 1
abs_num_n = X - 1
while True:

    if abs_num_p in P:
        flag_p = True
    else:
        flag_p = False

    if abs_num_n in P:
        flag_n = True
    else:
        flag_n = False

    if(flag_p == True & flag_n == True):
        abs_num_p += 1
        abs_num_n -= 1
        continue;
    elif(flag_p == True & flag_n == False):
        print(abs_num_n)
        break;
    elif(flag_p == False):
        print(abs_num_p)
        break;


Fixed submission:
X, N = input().split()
X = int(X)
N = int(N)

if N == 0:
    print(X)
    exit()

P = input().split()
for i in range(len(P)):
    P[i] = int(P[i])

if X not in P:
    print(X)
    exit()


abs_num_p = X + 1
abs_num_n = X - 1
while True:

    if abs_num_p in P:
        flag_p = True
    else:
        flag_p = False

    if abs_num_n in P:
        flag_n = True
    else:
        flag_n = False
    if(  flag_p == True  and flag_n == True ):
        abs_num_p += 1
        abs_num_n -= 1
        continue;
    elif(flag_p == True  and flag_n == False):
        print(abs_num_n)
        break;
    elif(flag_p == False and flag_n == True ):
        print(abs_num_p)
        break;
    elif(flag_p == False and flag_n == False):
        print(abs_num_n)
        break;

    i += 1
Buggy python submission (verdict: Runtime Error):
N = int(input())
As = list(map(int,input().split()))
Q = int(input())

lst = [0] * (10**5)
for A in As:
    lst[A] += 1

val = sum(As)

vals = []
for i in range(Q):
    B, C = map(int,input().split())
    val += (C-B) * lst[B]
    lst[C] += lst[B]
    lst[B] = 0
    vals.append(val)
for val in vals:
    print(val)

Fixed submission:
N = int(input())
As = list(map(int,input().split()))
Q = int(input())

lst = [0] * (10**5+1)
for A in As:
    lst[A] += 1

val = sum(As)

vals = []
for i in range(Q):
    B, C = map(int,input().split())
    val += (C-B) * lst[B]
    lst[C] += lst[B]
    lst[B] = 0
    vals.append(val)
for val in vals:
    print(val)

Buggy python submission (verdict: Runtime Error):
N = int(input())
As = list(map(int,input().split()))
Q = int(input())

lst = [0] * (10**5)
for A in As:
    lst[A] += 1

outs = []

for i in range(0,Q):
    B, C = map(int,input().split())
    lst[C] += lst[B]
    lst[B] = 0
    outs.append(sum([i*j for i,j in enumerate(lst)]))

for out in outs:
    print(out)

Fixed submission:
N = int(input())
As = list(map(int,input().split()))
Q = int(input())

lst = [0] * (10**5+1)
for A in As:
    lst[A] += 1

val = sum(As)

vals = []
for i in range(Q):
    B, C = map(int,input().split())
    val += (C-B) * lst[B]
    lst[C] += lst[B]
    lst[B] = 0
    vals.append(val)
for val in vals:
    print(val)

Buggy python submission (verdict: Runtime Error):
N = int(input())
As = list(map(int,input().split()))
Q = int(input())

lst = [0] * (10**5)
for A in As:
    lst[A] += 1

for i in range(0,Q):
    B, C = map(int,input().split())
    lst[C] += lst[B]
    lst[B] = 0
    print(sum([i*j for i,j in enumerate(lst)]))

Fixed submission:
N = int(input())
As = list(map(int,input().split()))
Q = int(input())

lst = [0] * (10**5+1)
for A in As:
    lst[A] += 1

val = sum(As)

vals = []
for i in range(Q):
    B, C = map(int,input().split())
    val += (C-B) * lst[B]
    lst[C] += lst[B]
    lst[B] = 0
    vals.append(val)
for val in vals:
    print(val)
Buggy python submission (verdict: Runtime Error):
s = input()
if S=="ABC":
    print("ARC")
else:
    print("ABC")

Fixed submission:
s = input()
if s=="ABC":
    print("ARC")
else:
    print("ABC")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
items = []
cnt = 0
for i in range(N):
    item = input()
    if item not in items:
        items.append(item)
        cnt += 1
print(cnt)

Fixed submission:
N = int(input())
items = []

for i in range(N):
    item = input()
    items.append(item)    
items.sort()
cnt = 0
before = ""
for index,item in enumerate(items):
    if index == 0:
        cnt += 1    
    elif before != item:
        cnt += 1
    before = item
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()

out = 0

for i in range(n):
    for j in range(i+1,n):
        if s[i] == s[j]:
            continue
        for k in range(j+1,n):
            if j - i == k - j:
                continue
            elif s[i] == s[k]:
                continue
            elif s[j] == s[k]:
                continue
            else:
                out += 1
print(out)

Fixed submission:
import math
N = int(input())
S = input()

R = len([s for s in S if s == "R"])
G = len([s for s in S if s == "G"])
B = len([s for s in S if s == "B"])

out = R * G * B
for i in range(N):
    intvl = math.ceil((N - i)/2)
    for j in range(1,intvl):
        if S[i] != S[i+j] and S[i+j] != S[i+2*j] and S[i] != S[i+2*j]:
            out -= 1
print(out)
Buggy python submission (verdict: Time Limit Exceeded):
n,x,y = map(int,input().split())
dists = [0]*(n)
for i in range(n):
    for j in range(i):
        dist = min(abs(i-j),abs(i+1-x)+1+abs(j+1-y),abs(j+1-x)+1+abs(i+1-y))
        dists[dist] = dists[dist]+1
    
for i in range(len(dists) - 1):
    print(dists[i+1])

Fixed submission:
n,x,y = map(int,input().split())
dists = [0]*(n)
for i in range(1,n+1):
    for j in range(1,i):
        dist = min(abs(i-j),abs(i-x)+1+abs(j-y),abs(j-x)+1+abs(i-y))
        dists[dist] = dists[dist]+1
    
for i in range(len(dists) - 1):
    print(dists[i+1])

Buggy python submission (verdict: Time Limit Exceeded):
n,x,y = map(int,input().split())
dists = []
for i in range(n):
    for j in range(i):
        dist = min(abs(i-j),abs((i+1)-x)+1+abs((j+1)-y),abs((j+1)-x)+1+abs((i+1)-y))
        dists.append(dist)
    
for i in range(n-1):
    print(sum([1 for dist in dists if dist == i+1]))

Fixed submission:
n,x,y = map(int,input().split())
dists = [0]*(n)
for i in range(1,n+1):
    for j in range(1,i):
        dist = min(abs(i-j),abs(i-x)+1+abs(j-y),abs(j-x)+1+abs(i-y))
        dists[dist] = dists[dist]+1
    
for i in range(len(dists) - 1):
    print(dists[i+1])

Buggy python submission (verdict: Time Limit Exceeded):
n,x,y = map(int,input().split())
dists = [0]*(n)
for i in range(n):
    for j in range(i):
        dist = min(abs(i-j),abs((i+1)-x)+1+abs((j+1)-y),abs((j+1)-x)+1+abs((i+1)-y))
        dists[dist] = dists[dist]+1
    
for i in range(len(dists) - 1):
    print(dists[i+1])

Fixed submission:
n,x,y = map(int,input().split())
dists = [0]*(n)
for i in range(1,n+1):
    for j in range(1,i):
        dist = min(abs(i-j),abs(i-x)+1+abs(j-y),abs(j-x)+1+abs(i-y))
        dists[dist] = dists[dist]+1
    
for i in range(len(dists) - 1):
    print(dists[i+1])

Buggy python submission (verdict: Time Limit Exceeded):
n,x,y = map(int,input().split())
ps = []
for i in range(n):
    for j in range(i):
        ps.append([j+1,i+1])

dists = [0]*(n)
for p in ps:
    dist = min(abs(p[0]-p[1]),abs(p[0]-x)+1+abs(p[1]-y),abs(p[1]-x)+1+abs(p[0]-y))
    dists[dist] = dists[dist]+1

for i in range(len(dists) - 1):
    print(dists[i+1])

Fixed submission:
n,x,y = map(int,input().split())
dists = [0]*(n)
for i in range(1,n+1):
    for j in range(1,i):
        dist = min(abs(i-j),abs(i-x)+1+abs(j-y),abs(j-x)+1+abs(i-y))
        dists[dist] = dists[dist]+1
    
for i in range(len(dists) - 1):
    print(dists[i+1])
Buggy python submission (verdict: Runtime Error):
import math
N = (int(input()))
items = list(map(int,input().split()))
for i in range(len(items)):    
    rest = items[:i] + items[i+1:]
    rest_unique = sorted(set(rest))
    out = 0
    for j in rest_unique:
        cnt = sum([1 for x in rest if x == j])
        if cnt >= 2:
            out = out + math.factorial(cnt)/math.factorial(cnt-2)/2
    print(int(out))

Fixed submission:
import math
e,o = map(int,input().split())
if e < 2:
    e_cases = 0
else:
    e_cases = math.factorial(e)/math.factorial(e-2)/2
if o < 2:
    o_cases = 0
else:
    o_cases = math.factorial(o)/math.factorial(o-2)/2
print(int(e_cases+o_cases))
Buggy python submission (verdict: Runtime Error):
L = map(int,input().split())
print((L/3)**3)

Fixed submission:
L = (int(input()))
print((L/3)**3)
Buggy python submission (verdict: Time Limit Exceeded):
import math
N = (int(input()))
items = list(map(int,input().split()))
for i in range(len(items)):    
    rest = items[:i] + items[i+1:]
    rest_unique = set(rest)
    out = 0
    for j in rest_unique:
        cnt = sum([1 for x in rest if x == j])
        if cnt >= 2:
            out = out + math.factorial(cnt)/math.factorial(cnt-2)/2
    print(int(out))

Fixed submission:
import math
input()
items = list(map(int,input().split()))
d = {}
for i in items:
    if i in d.keys():
        d[i] = d[i]+1
    else:
        d[i] = 1

p = {}
for k in d.keys():
    cnt = d[k]
    p[k] = (cnt*(cnt-1))/2

total = sum(p.values())

for item in items:
    print(int(total - d[item] + 1))

Buggy python submission (verdict: Time Limit Exceeded):
import math
N = (int(input()))
items = list(map(int,input().split()))
for i in range(len(items)):    
    rest = items[:i] + items[i+1:]
    rest_unique = list(set(rest))
    out = 0
    for j in rest_unique:
        cnt = sum([1 for x in rest if x == j])
        if cnt >= 2:
            out = out + math.factorial(cnt)/math.factorial(cnt-2)/2
    print(int(out))

Fixed submission:
import math
input()
items = list(map(int,input().split()))
d = {}
for i in items:
    if i in d.keys():
        d[i] = d[i]+1
    else:
        d[i] = 1

p = {}
for k in d.keys():
    cnt = d[k]
    p[k] = (cnt*(cnt-1))/2

total = sum(p.values())

for item in items:
    print(int(total - d[item] + 1))
Buggy python submission (verdict: Runtime Error):
print([1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51][int(input())+1])

Fixed submission:
print([1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51][int(input())-1])

Buggy python submission (verdict: Runtime Error):
print([1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51][int(input())])

Fixed submission:
print([1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51][int(input())-1])