Harryxun/stf_run huggingface dataset:
from collections import Counter
N, M = map(int, input().split())
groups = [0] * (N + 1)
group_num_list = [[0]]
group_num = 1
for _ in range(M):
    A, B = map(int, input().split())
    if groups[A] != 0 and groups[B] != 0:
        if groups[A] != groups[B]:
            lower = min(groups[A], groups[B])
            higher = max(groups[A], groups[B])
            for i in group_num_list[higher]:
                groups[i] = lower
            tmp = group_num_list[higher]
            group_num_list[lower].extend(tmp)
            # del group_num_list[higher]
    elif groups[A] != 0:
        groups[B] = groups[A]
        group_num_list[groups[A]].append(int(B))
    elif groups[B] != 0:
        groups[A] = groups[B]
        group_num_list[groups[B]].append(int(A))
    else:
        groups[A] = group_num
        groups[B] = group_num
        group_num_list.append([int(A), int(B)])
        group_num += 1
counter = Counter(groups)
# print(collection)
# print(group_num_list)
if int(counter.most_common()[0][0]) != 0:
    print(counter.most_common()[0][1])
else:
    print(counter.most_common()[1][1])


### FIXED CODE ###

from collections import Counter
N, M = map(int, input().split())
groups = [0] * (N + 1)
group_num_list = [[0]]
group_num = 1
for _ in range(M):
    A, B = map(int, input().split())
    if groups[A] != 0 and groups[B] != 0:
        if groups[A] != groups[B]:
            lower = min(groups[A], groups[B])
            higher = max(groups[A], groups[B])
            for i in group_num_list[higher]:
                groups[i] = lower
            tmp = group_num_list[higher]
            group_num_list[lower].extend(tmp)
            # del group_num_list[higher]
    elif groups[A] != 0:
        groups[B] = groups[A]
        group_num_list[groups[A]].append(int(B))
    elif groups[B] != 0:
        groups[A] = groups[B]
        group_num_list[groups[B]].append(int(A))
    else:
        groups[A] = group_num
        groups[B] = group_num
        group_num_list.append([int(A), int(B)])
        group_num += 1
counter = Counter(groups)
# print(collection)
# print(group_num_list)
if len(group_num_list) == 1:
    print(1)
elif int(counter.most_common()[0][0]) != 0:
    print(counter.most_common()[0][1])
else:
    print(counter.most_common()[1][1])
N, M, X=map(int, input().split())
list=[0]*(N+1)
m=list(int() for i in input().split())
for i in m:
  list[i]=1

### FIXED CODE ###

N, M, X=map(int, input().split())
sum=sum(int(i)<X for i in input().split())
print(min(sum, M-sum))
import math
a, b, c, d = map(int, input().split())
ans = 0

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

cd = lcm(c, d)

ca = (a // c)
cb = (b // c)
tmp_c = cb - ca

da = (a // d)
db = (b // d)
tmp_d = db - da

cda = (a // cd)
cdb = (b // cd)
tmp_cd = cdb - cda
ans = b - a - (tmp_c + tmp_d - tmp_cd) + 1

print(ans)


### FIXED CODE ###

import fractions
a, b, c, d = map(int, input().split())
ans = 0

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

cd = lcm(c, d)

# cの倍数とdの倍数の個数を数える
# cの倍数dの倍数の個数を引く
ca = ((a-1) // c)
# print(ca)
cb = (b // c)
# print(cb)
tmp_c = cb - ca

da = (a // d)
# print(da)
db = (b // d)
# print(db)
tmp_d = db - da

cda = (a // cd)
# print(cda)
cdb = (b // cd)
# print(cdb)
tmp_cd = cdb - cda
ans = b - a + 1 - (tmp_c + tmp_d - tmp_cd)

print(ans)
K, N = map(int, input().split())
A = list(map(int, input().split()))
B = [0] * N
for i in A:
  B[i]=A[i+1]-A[i]
  
B[N-1]=A[0]+K-A[N-1]

print(K-max(B))


### FIXED CODE ###

K, N = map(int, input().split())
A = list(map(int, input().split()))
B = [0] * N
k = 0
for i in A:
  k += 1
  if k != N:
    B[k-1]=A[k]-A[k-1]
  else:
    B[N-1] = A[0] + K - A[N-1]

print(K-max(B))
n = int(input())
lsx = []
lsy = []
ans = 0
if n==1:
    a = int(input())
    x,y=map(int,input().split())
    if y==0:
        print(0)
    else:
        print(1)
else:
    for i in range(n):
        a = int(input())
        for j in range(a):
            x,y = map(int,input().split())
            lsx.append(x)
            lsy.append(y)
            if x in lsx:
                if lsy[lsx.index(x)]!=lsy[-1]:
                    ans+=1
    test=0        
    for i in lsy:
        if i == 0:
            test+=1
    if test==len(lsy):
        print(1)
    else:
        print(n-ans)

### FIXED CODE ###

n = int(input())
ls = []
for i in range(n):
    a = int(input())
    p = []
    for i in range(a):
        x,y = map(int,input().split())
        p.append([x-1,y])
    ls.append(p)

ans = 0

for i in range(2**n):
    flag = 0
    for j in range(n):
        if (i >> j) & 1:
            for k in ls[j]:
                if (i>>k[0])&1 != k[1]:
                    flag = 1
                    break
    if flag == 0:
        ans = max(ans, bin(i)[2:].count('1'))
print(ans)
print(int(x**3))

### FIXED CODE ###

x = int(input())

print(x*x*x)
N, A = map(int, input().split())

if N // 500 <= A: print('Yes')
else: print('No')

### FIXED CODE ###

N = int(input())
A = int(input())
 
if N % 500 <= A: print('Yes')
else: print('No')
n = int(input())

stm = [[] for i in range(n)]

def possible(honest):
    for i in range(n):
        if honest[i] == '0':
            continue
        for j in range(len(stm[i])):
            if stm[i][j][1] == 1 and honest[stm[i][j][0]-1] == '0':
                return False
            elif stm[i][j][1] == 0 and honest[stm[i][j][0]-1] == '1':
                return False
    return True

            

for i in range(n):
    a = int(input())
    x,y = map(int, input().split())
    stm[i].append([x,y])
   
count = 0
for k in range(2**n):
    hon = list(bin(k)[2:])
    hon = ['0']*(n-len(hon)) + hon
    if possible(hon):
        print(hon)
        count = max(count, sum([int(x) for x in hon]))
print(count)            

### FIXED CODE ###

n = int(input())

stm = [[] for i in range(n)]

def possible(honest):
    #print(honest)
    for i in range(n):
        if honest[i] == '0':
            continue
        for j in range(len(stm[i])):
            #print(stm[i][j])
            #print(honest[stm[i][j][0]-1])
            if stm[i][j][1] == 1 and honest[stm[i][j][0]-1] == '0':
                return False
            elif stm[i][j][1] == 0 and honest[stm[i][j][0]-1] == '1':
                return False
    return True

            

for i in range(n):
    a = int(input())
    for _ in range(a):
        x,y = map(int, input().split())
        stm[i].append([x,y])
   
count = 0
for k in range(2**n):
    hon = list(bin(k)[2:])
    hon = ['0']*(n-len(hon)) + hon
    if possible(hon):
        count = max(count, sum([int(x) for x in hon]))
print(count)
n, t = map(int, input().split(' '))
tlist = map(int, input().split(' '))

sum_time = 0
for i in range(1, len(tlist)):
    delta = tlist[i] - tlist[i-1]
    shower = delta if delta <= t else t
    sum_time += shower
sum_time += t
print(sum_time)


### FIXED CODE ###

n, t = map(int, input().split(' '))
tlist = list(map(int, input().split(' ')))

sum_time = 0
for i in range(1, len(tlist)):
    delta = tlist[i] - tlist[i-1]
    shower = delta if delta <= t else t
    sum_time += shower
sum_time += t
print(sum_time)
int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
 
min_list = [a,b,c,d,e]
min_q = [(a%10),(b%10),(c%10),(d%10),(e%10)]
q_min = min(min_q)
min_index = min_q.index(q_min)
new_min = min_list.pop(min_index)

minute = 0
for i in range(len(min_list)):
    if (min_list[i]%10)==0:
        minute += min_list[i]
    else:
        minute = 10-(min_list[i]%10)+min_list[i]
 
minute += min_list[min_index]
 
print(minute)

### FIXED CODE ###

import itertools
import math

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

tlist = [A, B, C, D, E]
l = itertools.permutations(tlist, 5)

t = []
count = 0

for i in l:
  count = 0
  for j in range(5):
    if j != 4 :
      count += int(math.ceil(i[j] / 10) * 10)
    else:
      count += i[j]
  t.append(count)
  
print(min(t))
def factorial(n):
	fact = 1
	while n > 0:
		fact *= n
		n -= 1
	return fact
	
def combination(n, r):
    return factorial(n) // (factorial(n - r) * factorial(r))

n, m = map(int, input().split())
n_def = n
natural = list(range(2,320))
index = 0
while index < len(natural):
	for number in natural:
		if number % natural[index] == 0 and number / natural[index] != 1:
			natural.remove(number)
	index += 1
prime = natural

prime_division = {}
index = 0
number_prime = 0
while prime[index] <= m:
	if m % prime[index] == 0:
		m /= prime[index]
		number_prime += 1
		continue		
	else:
		prime_division[prime[index]] = number_prime
		number_prime = 0
		index += 1
else:
	prime_division[prime[index]] = number_prime

list_division = list(prime_division.values())
ans = 1
for i in list_division:
	ans *= combination(i+n-1,n-1)
print(int(ans%(10**9 + 7)))

### FIXED CODE ###

import math
def fact(a,b):
    ans = 1
    while a != b:
        ans *= a
        a -= 1
    return ans
def nCr(n,r):
    return (fact(n,r)) // (math.factorial(n-r))
def nHr(n,r):
    return nCr(n+r-1, r-1)
def prime(n): # nまでの素数を列挙
    import math
    num_list = [i + 1 for i in range(2,n,2)]
    list_prime = [2]
    limit = math.sqrt(n)
    if n == 2:
        return list_prime
    else:
        while True:
            p = num_list[0]
            if p >= limit:
                return list_prime + num_list
            list_prime.append(p)
            num_list = [num for num in num_list if num % p != 0]

def primeFactorization(n):
    import math
    list_prime = prime(int(math.sqrt(n)))
    i = 0
    dict_pF = {}
    dict_primeFactorization = {}
    for pri in list_prime:
        dict_pF[pri] = 0
    while True:
        if n == 1:
            for key, value in dict_pF.items():
                if value != 0:
                    dict_primeFactorization[key] = value
            return dict_primeFactorization
        elif i >= len(list_prime):
            dict_pF[n] = 1
            for key, value in dict_pF.items():
                if value != 0:
                    dict_primeFactorization[key] = value
            return dict_primeFactorization
        p = list_prime[i]
        if n % p == 0:
            n //= p
            dict_pF[p] += 1
            continue
        else:
            i += 1

ans = 1
n,m = map(int, input().split())
if m == 1:
    ans = 1
else:
    for factor,degree in primeFactorization(m).items():
        ans *= (nHr(degree,n)) % (10**9+7)
        
print(ans % (10**9+7))
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

count = 0
while True:
    if A[0]-B[0] >= 0:
        K -= B[0]
        if K >= 0:
            count += 1
            B.pop(0)
        else:
            break
    else:
        K -= A[0]
        if K >= 0 :
            count += 1
            A.pop(0)
        else:
            break        
print(count)
    

### FIXED CODE ###


import numpy as np
a,b,k=map(int,input().split())
n=list(map(int,input().split()))
m=list(map(int,input().split()))
n.insert(0,0)
m.insert(0,0)
n=np.array(n)
m=np.array(m)
n=n.cumsum()
m=m.cumsum()
ans=0
j=len(m)-1
for i in range(len(n)):
    if n[i]>k:
        break
    while m[j]>k-n[i]:
        j-=1
    ans=max(ans,i+j)
print(ans)
import bisect

A,B,Q=map(int,input().split())
inf = 10 ** 18
S = [-inf] + [int(input()) for _ in range(A)] + [inf]
T = [-inf] + [int(input()) for _ in range(B)] + [inf]

for q in range(Q):
    x = int(input())
    s_l = bisect.bisect_left(s,x)
    s_h = s_l + 1
    t_l = bisect.bisect_left(t,x)
    t_h = t_l + 1

    ans = inf
    for s in [s_l,s_h]:
        for t in [t_l,t_h]:
            d1 = abs(s-x)+abs(t-s)
            d2 = abs(t-x)+abs(s-t)
            ans = min(ans,d1,d2)
    
    print(ans)


### FIXED CODE ###

import bisect

A,B,Q=map(int,input().split())
inf = 10 ** 18
S = [-inf] + [int(input()) for _ in range(A)] + [inf]
T = [-inf] + [int(input()) for _ in range(B)] + [inf]

for q in range(Q):
    x = int(input())
    s_h = bisect.bisect(S,x)
    s_l = s_h - 1
    t_h = bisect.bisect(T,x)
    t_l = t_h - 1

    ans = inf
    for s in [S[s_l],S[s_h]]:
        for t in [T[t_l],T[t_h]]:
            d1 = abs(s-x)+abs(t-s)
            d2 = abs(t-x)+abs(s-t)
            ans = min(ans,d1,d2)
    
    print(ans)
n,k=map(int,input().split())
lists=list(map(int,input().split()))
Chlist=[0]*n
countlist=[0]*40
for s in range(n):
    Chlist[s]=format(lists[s],"0%ib"%40)
    for i in range(40):
        if Chlist[s][i]=="1":
            countlist[39-i]+=1

#countlistのi桁めが2**(i-1)の数である
power=0
for i in range(40):
    if 2**i<=k<2**(i+1):
        power=i

ans1=0
for j in range(power):
    ans1+=(2**j)*max(countlist[j],n-countlist[j])
ans1+=(2**power)*(countlist[power])


uselist=[0]*(k-2**power+1)
for some in range(k-2**power+1):
    c=format(some,’0%ib’%40)
    uselist[some]=c


### FIXED CODE ###

n,k=map(int,input().split())
k2=format(k+1,"0%ib"%40)
lists=list(map(int,input().split()))
countlist=[0]*40
for j in lists:
    c=format(j,"0%ib"%40)
    for i in range(40):
        if c[i]=="1":
            countlist[i]+=1

emptylist=[]
for i in range(40):
    if k2[i]=="1":
        emptylist.append(i)
if k>=1:
    ans=0
    for i in emptylist:
        subing=0
        for j in range(40):
            if j<i:
                if k2[j]=="1":
                    subing+=(2**(39-j))*(n-countlist[j])
                elif k2[j]=="0":
                    subing+=(2**(39-j))*countlist[j]
            if j==i:
                subing+=(2**(39-i))*countlist[i]
            
            if j>i:
                subing+=(2**(39-j))*max(countlist[j],n-countlist[j])
        ans=max(ans,subing)
    print(ans)
elif k==0:
    ans=0
    for i in range(40):
        ans+=(2**(39-i))*countlist[i]
    print(ans)
n = int(input())
d, m = divmod(n,2)
if m != 0
    print(n*d)

else:
    print(n*(d - 1) + d)

### FIXED CODE ###

n = int(input())
d,m = divmod(n,2)
if m != 0:
    print(n*d)

else:
    print(n*(d - 1) + d)
n = int(input())
lst = [135, 189, 105, 165, 195]
tmp = 0

for i in range(5):
    if n<=lst[i]:
        tmp += 1

print(tmp)

### FIXED CODE ###

a, b = map(int, input().split())
print(a * b - a - b + 1)
n,k=map(int,input().split())
a=[0]+list(map(int,input().split()))
s=[0]
p=[0]
for i in range(1,n+1):
  s[i].append(s[i-1]+a[i])
  p[i].append(p[i-1]+max(0,a[i]))
ans=0
for i in range(1,n-k+1):
  t=max(0,s[i+k]-s[i-1])
  t+=p[i-1]+p[n]-p[i+k]
  ans=max(ans,t)
print(ans)

### FIXED CODE ###

n,k=map(int,input().split())
a=[0]+list(map(int,input().split()))
s=[0]
p=[0]
for i in range(1,n+1):
  s.append(s[i-1]+a[i])
  p.append(p[i-1]+max(0,a[i]))
ans=0
for i in range(1,n-k+2):
  t=max(0,s[i+k-1]-s[i-1])
  t+=p[i-1]+p[n]-p[i+k-1]
  ans=max(ans,t)
print(ans)
def f(x):
    return x**3
print "f(x)"

### FIXED CODE ###

def cube(x):
    return x**3

def main():
    x = int(input())
    ans = cube(x)
    print(ans)

if __name__=='__main__':
    main()
X = int(input())
s = 100
c = 0
while s < X:
	s = s + s  // 100
    c = c + 1
print(c)

### FIXED CODE ###

X = int(input())
s = 100
c = 0
while s < X:
  s = s + s  // 100
  c = c + 1
print(c)
n = input
if n % 2 = 1:
    print(n * 2)
else:
    print(n)

### FIXED CODE ###

n = int(input())
if n % 2 == 1:
    print(n * 2)
else:
    print(n)
a,b =int(input().split())
if a < b:
 print('a < b')
elif a > b :
  print('a > b')
else:
 print('a == b')



### FIXED CODE ###

a,b =map(int, input().split())
if a < b:
 print('a < b')
elif a > b :
  print('a > b')
else:
 print('a == b')
N = int(input())

arr = [int(input()) for i in range(N) ]

import math

from functools import reduce

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

print(lcm(arr))

### FIXED CODE ###

N = int(input())

arr = [int(input()) for i in range(N) ]

import math
import fractions
from functools import reduce

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)  
  
print(lcm_list(arr))
import fractions
from functools import reduce

def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)
    
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr


N, M = map(int,input().split())
A = list(map(int,input().split()))

if gcd(*A) % 2 != 0:
    print(0)
    exit(0)

sisu_2 = factorization(A[0])[0][1] 

lcm_a = lcm(*A)
lcm_a_half = lcm_a // 2

#if (lcm_a // (2**(sisu_2-1)) % 2 == 0) or lcm_a > M:
if factorization(lcm_a)[0][1] != sisu_2 or lcm_a_half > M:
    print(0)
    exit(0)
else:
    print(int((M-lcm_a_half) // (lcm_a_half*2) + 1))

### FIXED CODE ###

import fractions
from functools import reduce

def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)
    
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr


N, M = map(int,input().split())
A = list(map(int,input().split()))

#if gcd(*A) % 2 != 0:
    #print(0)
    #exit(0)

#sisu_2 = factorization(A[0])[0][1] 

#lcm_a = lcm(*A)
#lcm_a_half = lcm_a // 2
lcm_a = lcm(*A) // 2

l = []
sisu_a0 = 0
for i in range(N):
    sisu = 0
    while A[i]%2==0:
        A[i] //= 2
        sisu += 1
    
    if sisu_a0==0:
        sisu_a0 = sisu
    else:
        if sisu_a0!=sisu:
            print(0)
            exit()
#if (lcm_a % (2**sisu_2) == 0) or lcm_a > M:
#if factorization(lcm_a)[0][1] != sisu_2 or lcm_a_half > M:
if lcm_a > M:
    print(0)
    exit(0)
else:
    print(int((M-lcm_a) // (lcm_a*2) + 1))
s = int(input())
if s == "ABC":
    print("ARC")
else:
    print("ABC")

### FIXED CODE ###

s = input()
if s == "ABC":
    print("ARC")
else:
    print("ABC")
h , w = (int(i) for i in input().split())
a =[]
dy = [0, 0, 1, -1]
dx = [1, -1, 0, 0]


for i in range(w):
    a.append(input())
    
f = True
def check(x,y):
    if a[x][y] =='.':
        return True
    for n in range(4):
        i = dx[n]
        j = dy[n]
        if 0 <= x+i < h and 0 <= y + j < w and a[x+i][y+j]=='#':
            #print(x+i,y+j)
            return True
        return False

print(check(0,0))
f = True
for i in range(w):
    for j in range(h):
        l = check(i,j)
        if not(l) and f:
                print ("No")
                f = False
                
if(f):
    print("Yes")

### FIXED CODE ###

H ,W = [int(i) for i in input().split(' ')]
s = []
#print(s)
for i in range(H):
    line = input()
    lis = []
    for str in line:
        lis.append(str)
    s.append(lis)


def drawable(h,w):
    for i in [-1,1]:
        if 0 <= w+i < W:
#            print(h,w+i)
            if s[h][w+i] =='#':
                return True
    for i in [-1,1]:
        if 0 <= h+i < H:
            if s[h+i][w] =='#':
                return True

    return False

flag = True
for i in range(H):
    for j in range(W):
#        print(i,j)
        if s[i][j]=='#' and not(drawable(i,j)):
           flag = False 

if flag:
    print("Yes")
else:
    print("No")
import sys
sys.setrecursionlimit(100001)

N, M = [int(n) for n in input().split()]
S = input()

ans = []

def rest(l, ans):
    s = M
    while s > 0:
        if s >= l:
            ans.append(l)
            return ans
        if S[l-s] == "1":
            if s == 1:
                return -1
            s -= 1
            continue
        l -= s
        if rest(l, ans) == -1:
            s -= 1
        else:
            ans.append(s)
            return ans
    return -1

ans = rest(N, [])

if ans == -1:
    print(-1)
else:
    print(" ".join([str(n) for n in ans]))

### FIXED CODE ###

import sys
sys.setrecursionlimit(200001)

N, M = [int(n) for n in input().split()]
S = input()

p1 = False
x1 = 0
m1 = N
c1 = 0
for n in S:
    if n == "1":
        if p1:
            c1 += 1
        else:
            c1 = 1
            p1 = True
    else:
        p1 = False
        if c1 > 0:
            if c1 > x1:
                x1 = c1
            if c1 < m1:
                m1 = c1
           
def rest(l, ans):
    s = M
    while s > 0:
        if s >= l:
            ans.append(l)
            return ans
        if S[l-s] == "1":
            if s == 1:
                return -1
            s -= 1
            continue
        l -= s
        if rest(l, ans) == -1:
            s -= 1
        else:
            ans.append(s)
            return ans
    return -1

if x1 > M - 1:
    ans = -1
else:
    ans = rest(N, [])

if ans == -1:
    print(-1)
else:
    print(" ".join([str(n) for n in ans]))
N = int(input())
R = []
for i in range(N):
  l = input().split()
  R.append((l[0], (-1)*int(l[1]), i))

R.sort()
for i in range(N):
  print(R[2]+1)

### FIXED CODE ###

N = int(input())
R = []
for i in range(N):
  l = input().split()
  R.append((l[0], (-1)*int(l[1]), i))

R.sort()
for i in range(N):
  print(R[i][2]+1)
N = int(input())
b = list(map(int, input().split()))

#成り立たせることができるかどうか
for i in range(1, N + 1):
    if b[i - 1] > i:
        print (-1)
        exit()


check_lst = [False] * N #i番目の数を使ったかどうか

ans_lst = [] #答えの逆順
for i in range(N - 1, -1, -1):
    if check_lst[i]: #True --> 既に使ったとき
        continue #次のiから続ける
    count = b[i] - 1
    index = i - 1
    # print ('count', count)
    # print ('index', index)
    while count > 0:
        if b[index] < b[i] and b[index] <= len(ans_lst) + 1: #次に入れたいやつより小さくて、iより大きいもの
            count -= 1
            # print ('B')
            if check_lst[index] == False:
                check_lst[index] = True
                # print (b[index])
                ans_lst.append(b[index])
        index -= 1
    ans_lst.append(b[i])
    check_lst[i] = True

for i in ans_lst:
    print (i)




### FIXED CODE ###

N = int(input())
b = list(map(int, input().split()))

#成り立たせることができるかどうか
for i in range(1, N + 1):
    if b[i - 1] > i:
        print (-1)
        exit()


check_lst = [False] * N #i番目の数を使ったかどうか

ans_lst = [] #答えの逆順
index = N - 1
while len(ans_lst) != N:
    if check_lst[index] == False and b[index] <= check_lst[:index].count(True) + 1:
        ans_lst.append(b[index])
        check_lst[index] = True
        index = N - 1
    else:
        index -= 1

for i in ans_lst:
    print (i)
n = int(input())
amari = ""

if n == 0:
    print(0)
    exit()

while n :
    if n%2 == 1:
        amari += "1"
        n -= 1
    else:
        amari += "0"
    n = n//-2
    
print(amari[::-1])

### FIXED CODE ###

n,k = list(map(int,input().split()))

if n%k == 0:
    print(0)
else:
    print(1)
import sys
print("A") if str.isupper(sys.argv[1]) else print("a")

### FIXED CODE ###

import sys
print("A") if str.isupper(input()) else print("a")
a = input()
if ord(a) >= 'a' and ord(a) <= 'z':
    print("a")
else:
    print("A")


### FIXED CODE ###

a = input()
if ord(a) >= ord('a') and ord(a) <= ord('z'):
    print("a")
else:
    print("A")
k = ["ABC":"ARC","ARC":"ABC"]
print(k[input()])

### FIXED CODE ###

k = {"ABC":"ARC","ARC":"ABC"}
print(k[input()])
A,B=input().split()
print(max([A+B,A-B,A*B]))

### FIXED CODE ###

A,B=map(int,input().split())
print(max([A+B,A-B,A*B]))
N, X = map(int, input().split())

L = [int(i) for i in input().split()]

d=0
for i in range(N+1):
    if d>X :
        print(i)
        break
    if i == N :
        print(i+1)
    d += L[i]


### FIXED CODE ###

N, X = map(int, input().split())

L = [int(i) for i in input().split()]

d=0
for i in range(N):
    d += L[i]
    if d>X :
        print(i+1)
        break
    if i == N-1 :
        print(N+1)
3 3 33

### FIXED CODE ###

def main():
    c = list(map(int, input().split()))

    c_set = set(c)
    print(len(c_set))


if __name__ == "__main__":
    main()