Harryxun/stf_run huggingface dataset:
N=int(input())
X=input()
XX=0
for i in range(N):
    XX+=int(X[N-i-1])*2**i
#print(XX)

POPCOUNT_TABLE16 = [0] * 2**16
for index in range(len(POPCOUNT_TABLE16)):
    POPCOUNT_TABLE16[index] = (index & 1) + POPCOUNT_TABLE16[index >> 1]

def popcnt5(v):
    return (POPCOUNT_TABLE16[ v        & 0xffff] +
            POPCOUNT_TABLE16[(v >> 16) & 0xffff] +
            POPCOUNT_TABLE16[(v >> 32) & 0xffff] +
            POPCOUNT_TABLE16[(v >> 48)         ])

def change(x,j):
    if int(x[j]):
        return XX-2**(N-1-j)
    else:
        return XX+2**(N-1-j)

def F(t):
    cnt=0
    n=t
    while n!=0:
        n%=popcnt5(n)
        cnt+=1
    return cnt


for i in range(N):
    #print(change(X,i))
    print(F(change(X,i)))

### FIXED CODE ###

N=int(input())
X=input()

def popcnt(x):
    n=x
    res=0
    while n>0:
        res+=n%2
        n//=2
    return res

table=[0,1]+[-1 for i in range(219998)]
for i in range(2,220000):
    table[i]=table[i%popcnt(i)]+1

moto=0
for i in range(N):
    if X[i]=='1':
        moto+=1

plus=0  #もとの数字に1のときのmodをしたやつ
minus=0

for i in range(N):
    plus+=int(X[i])*pow(2,N-1-i,max(1,moto-1))
    minus+=int(X[i])*pow(2,N-1-i,moto+1)
    plus%=(max(1,moto-1))
    minus%=(moto+1)

for i in range(N):
    ans=0
    if X[i]=='1':
        ans=plus
        ans-=pow(2,N-1-i,max(1,moto-1))
        ans%=(max(1,moto-1))
        if moto==1:
            ans=-1
    else:
        ans=minus
        ans+=pow(2,N-1-i,moto+1)
        ans%=(moto+1)
    if ans==-1:
        print(0)
    else:
        print(table[ans]+1)
N, K = map(int,input().split())
List = list(map(int,input().split()))
Newlist = [1]
a=1
for i in range(N):
    a = List[a-1]
    if a==Newlist[i-1]:
        print(a)
        break
    elif a in Newlist:
        Cicle = Newlist[Newlist.index(a):Newlist[i-1]]
        print(Cicle[(K-i)%len(Cicle)-1])
        break
    else:
        Newlist.append(a)

### FIXED CODE ###

N, K = map(int,input().split())
ls_pass = [0]+list(map(int,input().split()))
a=1
b=0

ls=["ンゴ"]+[0]+["ンゴ"]*(N-1)
ls_past=[1]
for i in range(1,N*3):
  b=a
  a=ls_pass[a]
  if ls[a]!="ンゴ":
    ls_cicle=ls_past[ls[a]:i]
    print(ls_cicle[(K-i)%len(ls_cicle)])
    break
  elif i==K:
    print(a)
    break  
  else:
    ls_past.append(a)
    ls[a]=i
n = int(input())
z = []
y = 0
for i in range(n):
  line = input().split(" ")
  if int(line[0])==int(line[1]):
    z.append(i)

for i in range(n-3):
  if z[i]==z[i+1]-1:
    if z[i+1]==z[i+2]-1:
      y += 1
if y > 0:
  print("Yes")
else:
  print("No")


### FIXED CODE ###

n = int(input())
z = []
y = 0
for i in range(n):
  line = input().split(" ")
  if int(line[0])==int(line[1]):
    z.append(i)

for i in range(len(z)-2):
  if z[i]==z[i+1]-1:
    if z[i+1]==z[i+2]-1:
      y += 1
if y > 0:
  print("Yes")
else:
  print("No")
# coding:utf-8
import readline
import datetime
readline = sys.stdin.buffer.readline
H1 = int(readline())
M1 = int(readline())
H2 = int(readline())
M2 = int(readline())
K = int(readline())
while not 0 <= H1 < 23 and 0 <= M1 < 59 and 0 <= H2 < 23 and 0 <= M2 < 59:
    H1 = int(readline())
    M1 = int(readline())
    H2 = int(readline())
    M2 = int(readline())
    K = int(readline())
if M2 > M1:
    a = (H2 - H1) * 60 + M2 - M1
    print(a - K)
if M2 < M1:
    b = (H2 - H1) * 60 + M1 - M2
    print(b - K)

### FIXED CODE ###

import sys
readline = sys.stdin.buffer.readline
h1, m1, h2, m2, k = map(int, readline().split())
print(60 * (h2 - h1) + m2 - m1 - k)
import sys
x,y = map(int,input().split())if y % x != 0:
    print('No')
    sys.exit()
if 2**x >= y:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

import sys

x,y = map(int,input().split())
if y % 2 != 0:
    print('No')
    sys.exit()

if 4 * x < y:
    print('No')
    sys.exit()

if 4 * x >= y:
    if 2 * x <= y:
        print('Yes')
    else:
        print('No')
lst = list(int(input()))
flag = 0
for i in range(3):
    if lst[i] == lst[i+1]:
        flag += 1
if flag == 0:
    print('Good')
else:
    print('Bad')

### FIXED CODE ###

lst = list(str(input()))
flag = 0
for i in range(3):
    if lst[i] == lst[i+1]:
        flag += 1
if flag == 0:
    print('Good')
else:
    print('Bad')
elements = [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]
th = K-1
print(elements[th])

### FIXED CODE ###

elements = [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]
K = int(input())
th = K-1
print(elements[th])
A, B = map(float,input().split())
A = int(A)
B = int(B*1000)
ans = A*B//1000
print (ans)

### FIXED CODE ###


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

t = 1
ans = 1
count = 0

if 0 in A:
    ans = 0
else:  
    for a in A:
        ans *= a
        t *= a
        while t >= 10:
            t /= 10
            count += 1
            if count >= 19:
                ans = -1 
                break

if ans > 10**18:
    print(-1)
else:
    print(ans)
import sys
import itertools
n=int(input())
l=list(map(int,input().split()))
l.sort()
s=set(l)
if len(s)>=4:print("No");sys.exit()
s=list(s)
flag=0
for i in itertools.permutations(s):
  if i[0]^i[2]==i[1] and i[1]^i[2]==i[0] and i[0]^i[1]==i[2]:flag+=1
if flag==6:print("Yes")
else:print("No")


### FIXED CODE ###

import sys
import itertools
n=int(input())
l=list(map(int,input().split()))
l.sort()
s=set(l)
if len(s)>=4 :print("No");sys.exit()
if len(s)==1:print("Yes" if 0 in s else "No");sys.exit()
s=list(s);s.sort()
if len(s)==2:
  if 0 not in s:print("No");sys.exit()
  if n%3==1:
    if l.count(0)==(n-1)//3:print("Yes");sys.exit()
    else:print("No");sys.exit()
  elif n%3==2:
    if l.count(0)==(n+1)//3:print("Yes");sys.exit()
    else:print("No");sys.exit()
  elif n%3==0:
    if l.count(0)==n//3:print("Yes");sys.exit()
    else:print("No");sys.exit()
a=l.count(s[0]);b=l.count(s[1]);c=l.count(s[2])
if a!=b or b!=c or c!=a:print("No");sys.exit()
flag=0
for i in itertools.permutations(s):
  if i[0]^i[2]==i[1] and i[1]^i[2]==i[0] and i[0]^i[1]==i[2]:flag+=1
if flag!=0:print("Yes")
else:print("No")
def solve(s):
    if s <= 10 ** 9:
        return 0, 0, 1, 0, 0, s
    X = 10 ** 9
    Y = (s - 1) // X + 1
    xy = X * Y - s
    lim = min(Y, int(xy ** 0.5))
    for y in range(1, lim + 1):
        x, m = divmod(xy, y)
        if x <= X and m == 0:
            return 0, 0, X, y, x, Y


s = int(input())
print(*solve(s))


### FIXED CODE ###

def solve(s):
    k = 10 ** 9
    if s <= k:
        return 0, 0, 1, 0, 0, s
    X = k
    while True:
        Y = (s - 1) // X + 1
        while Y <= k:
            xy = X * Y - s
            if xy == 0:
                return 0, 0, X, 0, 0, Y
            lim = min(Y, int(xy ** 0.5))
            for y in range(1, lim + 1):
                x, m = divmod(xy, y)
                if x <= X and m == 0:
                    return 0, 0, X, y, x, Y
            Y += 1
        X -= 1


s = int(input())
print(*solve(s))
c = 1
while True:
    N = int(raw_input())
    if N == 0:
        break
    elif c != 1:
        print ''
     
    dic = {}
    for i in range(N):
        lis = raw_input().split()
        name = lis[0]
        lis = map(int, lis[1:])
        point = lis[0]*3 + lis[2]
        dic[name] = [point, N-i]
    
    for k, v in sorted(dic.items(), key=lambda x: (x[0][0], x[0][1]), reverse=True):
        print '%s,%s' % (k, v[0])
    c += 1

### FIXED CODE ###

N = input()
while True:
    dic = {}
    for i in range(N):
        lis = raw_input().split()
        dic[lis[0]] = [3*int(lis[1])+int(lis[3]), N-i]
    
    for k, v in sorted(dic.items(), key=lambda x: (x[1][0], x[1][1]), reverse=True):
        print '%s,%s' % (k, v[0])

    N = input()
    if N == 0: break
    print
A,B,C,D = map(int,input().split())
X = max(C,D)
Y = min(C,D)
def gcd(a,b):
  while b!= 0:
    a,b = b,a%b
  return a
l = C*D/ gcd(X,Y)
def f(x):
  return x - (x//C + x//D - x//l)
ans = f(B) - f(A-1)
print(ans)

### FIXED CODE ###

S = input()
if S[0]==S[1] or S[1]==S[2] or S[2]==S[3]:
  print("Bad")
else:
  print("Good")
n=int(input())
s=str(input())


a=s.find('#');b=s.rfind('.')

if a<b:
    c=s[a:b+1].count('#');d=s[a:b+1].count('.')
    ans=min(c,d)
else:
    ans=0

l=[]
for i in range(n):
    if s[i]=='.':
        l.append(i)

y=s[l[0]+1:].count('.')
for i in range(len(l)):
    x=s[:l[i]].count('#')
    ans=min(ans,x+y)
    y-=1
print(ans)

### FIXED CODE ###

n=int(input())
s=str(input())
a=0
b=s.count('.')
l=[b]
for i in range(n):
    if s[i]=='#':
        a+=1
    if s[i]=='.':
        b-=1
    l.append(a+b)
print(min(l))
p = 10**9 + 7

def pow_mod(p,a,n):
    res = 1
    while n > 0:
        if n % 2 == 1:
            res = (res * a) % p
        n = n // 2
        a = (a*a)%p
    return res


def comb_mod(n,k):
    global fac
    res = fac[n] * pow_mod(p,fac[k],p-2) * pow_mod(p,fac[n-k],p-2) % p
    return res

X,Y = map(int,input().split())
X,Y = max(X,Y),min(X,Y)
n = (X+Y)//3

fac = [1]
foo = 1
for i in range(1,n+1):
    foo = (foo*i)%p
    fac.append(foo)

k = 2*n - X
if (X+Y)%3 != 0 or n < k:
    ans = 0
else:
    ans = comb_mod(n,k)
print(ans)

### FIXED CODE ###

p = 10**9 + 7

def pow_mod(p,a,n):
    res = 1
    while n > 0:
        if n % 2 == 1:
            res = (res * a) % p
        n = n // 2
        a = (a*a)%p
    return res


def comb_mod(n,k):
    global fac
    res = fac[n] * pow_mod(p,fac[k],p-2) * pow_mod(p,fac[n-k],p-2) % p
    return res

X,Y = map(int,input().split())
X,Y = max(X,Y),min(X,Y)
n = (X+Y)//3

fac = [1]
foo = 1
for i in range(1,n+1):
    foo = (foo*i)%p
    fac.append(foo)

k = 2*n - X
if (X+Y)%3 != 0 or n < k or k < 0:
    ans = 0
else:
    ans = comb_mod(n,k)

print(ans)
N = input()
if N % 2 == 1:
  a = 1
else:
  a = 0
print(N//2+a)

### FIXED CODE ###

N = int(input())
if N % 2 == 1:
  a = 1
else:
  a = 0
print(N//2+a)
from fractions import gcd
from functools import reduce
import sys
sys.setrecursionlimit(10 ** 7)

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

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

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


if __name__ == '__main__':
    n, m = list(map(int, input().split(" ")))
    a = list(map(int, input().split(" ")))
    a = list(set(a))

    # for j in a:
    #     if j % 2 != 0:
    #         print("0")

    # a = [i/2 for i in a]
    l = lcm_list(a)

    # if l == 0:
    #     print(0)
    #     exit()

    i = l / 2

    for j in a:
        if i // (j // 2) % 2 == 0:
            print(0)
            exit()

    if m < i:
        print("0")
    else:
        # print("1")
        # print(int(((m - i) // l) + 1))
        print(int((m // i + 1) // 2))

### FIXED CODE ###

from fractions import gcd
from functools import reduce
import sys
sys.setrecursionlimit(10 ** 7)

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

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

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


if __name__ == '__main__':
    n, m = list(map(int, input().split(" ")))
    a = list(map(int, input().split(" ")))
    a = list(set(a))

    # for j in a:
    #     if j % 2 != 0:
    #         print("0")

    # a = [i/2 for i in a]
    l = lcm_list(a)

    # if l == 0:
    #     print(0)
    #     exit()

    if (2 * m) < l:
        print("0")
        exit()

    i = l / 2

    for j in a:
        if i // (j // 2) % 2 == 0:
            print(0)
            exit()

    # if m < i:
    #     print("0")
    else:
        # print("1")
        print(int(((m - i) // l) + 1))
        # print(int((m // i + 1) // 2))
x,y,z = input().split()
x = int(x)
y = int(y)
z = int(z)
if x＊y > z:
  print(x＊y)
else:
  print(z)


### FIXED CODE ###

x,y,z = map(int,input().split())
x = int(x)
y = int(y)
z = int(z)
if x*y < z:
  print(x*y)
else:
  print(z)
s=input()
 
ds=list(s)
 
 
c1=0
while ds[c1]!='A'
  c1+=1
 
c2=-1
while ds[c2]!='Z':
  c2-=1
 
print(s[c1:c2])
 
s=input()

ds=list(s)


c1=0
while ds[c1]!='A'
  c1+=1

c2=-1
while ds[c2]!='Z':
  c2-=1

print(len(s[c1:c2]))



### FIXED CODE ###

from collections import deque
s=input()

ds=deque(s)
flag=True

while ds[0]!='A' or ds[-1]!='Z':
  if ds[0]!='A':
    ds.popleft()
  if ds[-1]!='Z':
    ds.pop()
print(len(ds))
from itertools import combinations as c
n=int(input())
s=[input() for _ in range(n)]
m=[m1 for m1 in s if s.startswith('M')]
a=[a1 for a1 in s if s.startswith('A')]
r=[r1 for r1 in s if s.startswith('R')]
c=[c1 for c1 in s if s.startswith('C')]
h=[h1 for h1 in s if s.startswith('H')]
march=[len(m),len(a),len(r),len(c),len(h)]
print(sum(i*j*k for i, j, k in c(march, 3)))

### FIXED CODE ###

from itertools import combinations as c
n=int(input())
s=[input() for _ in range(n)]
march=[0]*5
for i in range(n):
    if s[i][0]=='M':march[0]+=1
    elif s[i][0]=='A':march[1]+=1
    elif s[i][0]=='R':march[2]+=1
    elif s[i][0]=='C':march[3]+=1
    elif s[i][0]=='H':march[4]+=1
print(sum(i*j*k for i, j, k in c(march, 3)))
from itertools import accumulate

n = int(input())
s = input()
cp = []
count_a = 0
accsum_ab = []
for i, c in enumerate(s):
    if c == 'D':
        cp.append((0, i))
        count_a += 1
    elif c == 'M':
        cp.append((1, i))
        accsum_ab.append(count_a)
    elif c == 'C':
        cp.append((2, i))

i, j = 0, 0
while i < len(cp) and cp[i][0] != 0:
    if cp[i][0] == 1:
        j += 1
    i += 1
cp = cp[i:]
accsum_ab = accsum_ab[j:]
i, j = -1, -1
while -i <= len(cp) and cp[i][0] != 2:
    if cp[i][0] == 1:
        j -= 1
    i -= 1
if i < -1:
    cp = cp[:i + 1]
    if j < -1:
        accsum_ab = accsum_ab[:i + 1]
accsum_ab = [0] + list(accumulate(accsum_ab))

q = int(input())
buf = []
for k in map(int, input().split()):
    ans = 0
    l = 0
    count_b = 0
    rejected_a = 0
    rejected_b = 0
    for r, item in enumerate(cp):
        if item[0] == 1:
            count_b += 1
        elif item[0] == 2:
            left_limit = item[1] - k
            while l < r and cp[l][1] <= left_limit:
                old_item = cp[l]
                if old_item[0] == 0:
                    rejected_a += 1
                elif old_item[0] == 1:
                    rejected_b += 1
                l += 1
            ans += accsum_ab[count_b] - accsum_ab[rejected_b] - rejected_a * (count_b - rejected_b)
    buf.append(ans)
print('\n'.join(map(str, buf)))


### FIXED CODE ###

from itertools import accumulate

n = int(input())
s = input()
acc_cnt_a = [0] * (n + 1)
acc_cnt_b = [0] * (n + 1)
acc_cnt_ab = [0] * (n + 1)
c_loc = []
cnt_a = 0
for i, c in enumerate(s):
    if c == 'D':
        acc_cnt_a[i] += 1
        cnt_a += 1
    elif c == 'M':
        acc_cnt_b[i] += 1
        acc_cnt_ab[i] += cnt_a
    elif c == 'C':
        c_loc.append(i + 1)
acc_cnt_a = [0] + list(accumulate(acc_cnt_a))
acc_cnt_b = [0] + list(accumulate(acc_cnt_b))
acc_cnt_ab = [0] + list(accumulate(acc_cnt_ab))

q = int(input())
buf = []
for k in map(int, input().split()):
    ans = 0
    for r in c_loc:
        l = r - k
        if l > 0:
            rejected_a = acc_cnt_a[l]
            cnt_internal_b = acc_cnt_b[r] - acc_cnt_b[l]
            cnt_internal_ab = acc_cnt_ab[r] - acc_cnt_ab[l]
            ans += cnt_internal_ab - rejected_a * cnt_internal_b
        else:
            ans += acc_cnt_ab[r]
    buf.append(ans)
print('\n'.join(map(str, buf)))
n, m = map(int, input().split())
rootList = [-1] * n

def getRoot(x):
    if rootList[x] < 0:
        return x
    rootList[x] = getRoot(rootList[x])
    return rootList[x]

def setSameRoot(x, y):
    x = getRoot(x)
    y = getRoot(y)
    if x != y:
        G[x], G[y] = min(x, y), min(x, y)

for i in range(0, m):
    s, t = map(int, input().split())
    setSameRoot(s, t)
q = int(input())
for i in range(0, q):
    s, t = map(int, input().split())
    print("yes" if getRoot(s) == getRoot(t) else "no")

### FIXED CODE ###

n, m = map(int, input().split())
rootList = [-1 for i in range(n)]
 
def getRoot(x):
    r = rootList[x]
    if r < 0:
        rootList[x] = x
    elif r != x:
        rootList[x] = getRoot(r)
    return rootList[x]
 
 
def setSameRoot(x, y):
    x = getRoot(x)
    y = getRoot(y)
    if x != y:
        rootList[x] = rootList[y] = min(x, y)
 
for i in range(m):
    s, t = map(int, input().split())
    setSameRoot(s, t)
q = int(input())
for i in range(q):
    s, t = map(int, input().split())
    print("yes" if getRoot(s) == getRoot(t) else "no")
import re
s = input()
print("A%sC" % re.match('AtCoder (.).* Contest', s)[1])

### FIXED CODE ###

import re
s = input()
print("A%sC" % re.match('AtCoder (.).* Contest', s).group(1))
input = list(map(int,input().split()))
print(int(input[1]*input[2] + (input[0]-input[1])*input[3]))

### FIXED CODE ###

n = int(input())
k = int(input())
x = int(input())
y = int(input())
 
if n>k:
    p = k*x + (n-k)*y
else:
    p = n*x
print(p)
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
a = []
a.append(10-(A % 10))
a.append(10-(B % 10))
a.append(10-(C % 10))
a.append(10-(D % 10))
a.append(10-(E % 10))
b = []
for i in range(5):
    if a[i] != 10:
        b.append(a[i])
c = A+B+C+D+E+sum(b)-max(b)
print(c)

### FIXED CODE ###

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
a = []
a.append(10-(A % 10))
a.append(10-(B % 10))
a.append(10-(C % 10))
a.append(10-(D % 10))
a.append(10-(E % 10))
b = [0]
for i in range(5):
    if a[i] != 10:
        b.append(a[i])
c = A+B+C+D+E+sum(b)-max(b)
print(c)
import numpy as np
n, a = [int(i) for i in input().split()]
x = [int(i) for i in input().split()]
sx=sum(x)
dp= np.zeros((n+1,n*a+1),dtype=int)
dp[0][0]=1
ans=0

f=0
for k in range(1,n+1):
  f+=k
  for i in range(k,-1,-1):
    for j in range(0, f + 1):
      if j>=x[k-1] and i>=1:
        dp[i][j]= dp[i][j] + dp[i-1][j-x[k-1]]
      else:
        dp[i][j]= dp[i][j] 
      
for i in range(1,n+1):
  ans+=dp[i][a*i]

print(ans)

### FIXED CODE ###

n, a = [int(i) for i in input().split()]
x = [int(i) for i in input().split()]

dp=[[0 for i in range(a*n+1)] for j in range(n+1)]
dp[0][0]=1
ans=0
f=0

for k in range(1,n+1):
  kx=x[k-1]
  f+=kx
  for i in range(k,0,-1):
    for j in range(kx,a*n+1):
      dp[i][j] += dp[i-1][j-kx]
      if j > f:
        break
      
for i in range(1,n+1):
  ans+=dp[i][a*i]

print(ans)
A,B = map(int,input().split())
o = -1
if A >= 10 or B>=10
    print(o)
else:
print(A*B)



### FIXED CODE ###

A,B = map(int,input().split())
o = -1
if A >= 10 or B >= 10:
    print(o)
else:
    print(A*B)
s = input()
t = input()
ans = 0
for i in xrange(len(s)):
  if s[i] != t[i]:
    ans += 1
print(ans)

### FIXED CODE ###

s = input()
t = input()
ans = 0
for i in range(len(s)):
  if s[i] != t[i]:
    ans += 1
print(ans)
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
s=0
for i in range(N):
  if i>=1 and A[i]==A[i-1}+1:
    s=s+B[A[i]-1]+C[i-1]
  else:
    s=s+B[A[i]-1]
print(s)

### FIXED CODE ###

N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
s=0
temp=""
for i in A:
  s+=B[i-1]
  if temp==i-1:
    s+=C[temp-1]
  temp=i
print(s)
A, B = map(int, input().split())
ans = 0;
for i in range(2):
  if A > B:
    ans += A
    A -= 1
  else:
    ans += B:
    B -= 1
else:
  print(ans)

### FIXED CODE ###

A, B = map(int, input().split())
ans = 0
for i in range(2):
  if A > B:
    ans += A
    A -= 1
  else:
    ans += B
    B -= 1
else:
  print(ans)
while 1:
hit = blow = 0
try: a = [*map(int,input().split(' '))]
except: break
b = [*map(int,input().split(' '))]
for i in range(len(a)):
	if a[i] == b[i]:
		hit += 1
	if a[i] == b[i-1]:
		blow += 1
print(hit, blow)


### FIXED CODE ###

while 1:
	hit = blow = 0
	try: a = list(map(int,input().split()))
	except: break
	b = list(map(int,input().split()))
	for i in range(4):
		if a[i] == b[i]:
			hit += 1
		elif a[i] in b:
			blow += 1
	print(hit, blow)
def ABC_61_B():
    N,M = map(int, input().split())
    t = [ 0 for _ in range(N)]
    t2 = [ 0 for _ in range(N)]

    for i in range(M):
        a,b = map(str, input().split())
        t[int(a)-1] = str(t[int(a)-1])+b
        t[int(b)-1] = str(t[int(b)-1])+a

    for i in range(len(t)):
        t2=list(t[i])
        print(len(t2)-1)

if __name__ == '__main__':

    ABC_61_B()

### FIXED CODE ###

N,M = map(int, input().split())
t=[0 for _ in range(N)]

for i in range(M):
	a,b = map(int, input().split())
	t[a-1]+=1
	t[b-1]+=1

for i in range(N):
	print(t[i])
a, b, x = map(int, input().split())

count = 0
if a == 0:
    count = 1

#print((a/x).is_integer())

if (a/x).is_integer() == True:
    #print("BBBBBBBBBB")
    print((b//x)-(a//x)+1)

if (a/x).is_integer() == False:
    #print("aaaaaaaaaaaaaa")
    print((b//x)-(a//x))


### FIXED CODE ###

a, b, c = input().split()
print(a[0]+b[0]+c[0])
date = int(input().replace("/", ""))
if date <= 20190430:
    print("Heisei")
else:
    print("TBD")S = list(map(int, input().split("/")))
ans = True
if S[0] > 2019:
    ans = False
elif S[0] == 2019 and S[1] > 4:
    ans = False

if ans:
    print("Heisei")
else:
    print("TBD")

### FIXED CODE ###

date = input()

import re
date_num = int(re.sub("\D", "", date))

if date_num <= 20190430:
    print("Heisei")
else:
    print("TBD")
n = int(input())
d = int(input())
ans = n/(2*d + 1)
if n % (2*d + 1) != 0:
  print("{}".format(ans+1))
else:
  print("{}".format(ans))

### FIXED CODE ###

n, d = map(int,input().split())
ans = n // (2*d + 1)
if n % (2*d + 1) == 0:
  print(ans)
else:
  print(ans+1)
import sys
import math
INF=1e9
mod=1e9+7
n,m=[int(i) for i in input().split()]
a=[int(i) for i in input().split()]
g=1
init=0
num=a[0]
while(num%2==0):
    num/=2
    init+=1
for i in range(1,n):
    num=a[i]
    cnt=0
    while(num%2==0):
        num/=2
        cnt+=1
    if(cnt!=init):
        print(0)
        sys.exit()
for i in range(n):
    a[i]//=2
    g=g*a[i]//math.gcd(g,a[i])
#print(g)
ans=(m//g)
if(ans%2==1):
    print(ans//2+1)
else:
    print(ans//2)

### FIXED CODE ###

import sys
import math
INF=1e9
mod=1e9+7

def gcd(a,b):
    if (b==0):
        return a
    return gcd(b,a%b)
 
def lcm(a,b):
    return (a//gcd(a,b))*b
 

n,m=[int(i) for i in input().split()]
a=[int(i) for i in input().split()]
g=1
init=0
for i in range(n):
    a[i]//=2
num=a[0]
while(num%2==0):
    num/=2
    init+=1
for i in range(1,n):
    num=a[i]
    cnt=0
    while(num%2==0):
        num/=2
        cnt+=1
    if(cnt!=init):
        print(0)
        sys.exit()
for i in range(n):
    g=lcm(g,a[i])
#print(g)
ans=(m//g)
if(ans%2==1):
    print(ans//2+1)
else:
    print(ans//2)
n = int(input())
S = []
for i in range(n):
    s = input()
    S.append(s)
S.sort()
A = list(set(S))
A.sort()
#print(A)
#print(S)
NUM =[0]*len(A)
j = 0
for i in range(len(S)):
    if(i+1<len(S)):
        if (S[i] == S[int(i)+1]):
            NUM[j] = NUM[j]+ 1
        else:
            j += 1
import numpy as np
b = np.argmax(NUM)
#print(NUM,b)
for e,i in enumerate(NUM):
    #print(NUM[b])
    if (i == NUM[b]):
        print(A[e])

### FIXED CODE ###

n = int(input())
S = []
for i in range(n):
    s = input()
    S.append(s)
S.sort()
A = list(set(S))
A.sort()
#print(A)
#print(S)
NUM =[0]*len(A)
j = 0
for i in range(len(S)):
    if(i+1<len(S)):
        if (S[i] == S[int(i)+1]):
            NUM[j] = NUM[j]+ 1
        else:
            j += 1
import numpy as np
b = np.argmax(NUM)
#print(NUM,b)
for e,i in enumerate(NUM):
    #print(NUM[b])
    if (i == NUM[b]):
        print(A[e])
import sys
    n=999999
    prime = [1]*(n+1)
    (prime[0],prime[1])=(0,0)
    for i in xrange(2,n+1):
        if type(i*i)==int:
            for j in xrange(i*i,n+1,i):
                prime[j]=0

for n in sys.stdin:
    print prime[:n-1].count(1)

### FIXED CODE ###

import sys
n=999999
prime = [1]*(n+1)
(prime[0],prime[1])=(0,0)
for i in [v for v in xrange(2,n+1) if v*v<n+1]:
        for j in xrange(i*i,n+1,i):
            prime[j]=0

for inp in sys.stdin:
    print prime[:int(inp)+1].count(1)
a,b,c=(int(x) for x in input().split())

sum =a+b+c
if sum>=22:
  print(bust)
else
  print(win)


### FIXED CODE ###

a,b,c=(int(x) for x in input().split())

sum =a+b+c
if sum>=22:
  print("bust")
else:
  print("win")
s=input()

l=len(s)

for i in range(l):
  s[i]=x
  
  
print(s)

### FIXED CODE ###

s=input()
a=""

l=len(s)

for i in range (l):
  a=a+"x"
print(a)