Harryxun/stf_run huggingface dataset:
from collections import defaultdict, deque, Counter
N, Q = map(int, input().split())

connection = defaultdict(list)
for i in range(N-1):
    a,b =  map(int, input().split())
    connection[a].append(b)
    connection[b].append(a)

operations = Counter()
for i in range(Q):
    p,q =  map(int, input().split())
    operations[p] += q

ans = defaultdict(int)
ans[1] = operations[1]

def func(node,p_node):
    ans[node] = ans[p_node] + operations[node]
    connection[node].remove(p_node)
    for c_node in connection[node]:
        func(c_node, node)

for node in connection[1]:
    func(node, 1)

print(' '.join(list(map(str, ans.values()))))


### FIXED CODE ###

import sys
sys.setrecursionlimit(200000)
from collections import deque

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

connection = [[] for i in range(N)]
for i in range(N-1):
    a,b =  map(int, input().split())
    connection[a-1].append(b)
    connection[b-1].append(a)

operations = [0] * N
for i in range(Q):
    p,q =  map(int, input().split())
    operations[p-1] += q

ans = [0] * N

stack = deque([1])
while len(stack)>0:
    node = stack.pop()
    ans[node-1] += operations[node-1]
    for node_c in connection[node-1]:
        connection[node_c-1].remove(node)
        ans[node_c-1] += ans[node-1]
        stack.append(node_c)

print(' '.join(map(str, ans)))
import numpy as np
N, M = [int(x) for x in input().split()]
H = [float(x) for x in input().split()]
AB = [[int(x) for x in input().split()] for _ in range(M)]

graph = np.zeros((N,N))
for A, B in AB:
  graph[A-1][B-1] = 1
  graph[B-1][A-1] = 1

ans = 0
for i in range(N):
  for j in range(N):
    h = 0
    if(graph[i][j]!=0):
      if(H[i]<=H[j]):
        h += 1
        break
  if(h==0):
    ans += 1
print(ans)

### FIXED CODE ###

import numpy as np
N, M = [int(x) for x in input().split()]
H = [float(x) for x in input().split()]
AB = [[int(x) for x in input().split()] for _ in range(M)]

max_h = [0 for _ in range(N)]

for A, B in AB:
  max_h[A-1] = max(max_h[A-1], H[B-1])
  max_h[B-1] = max(max_h[B-1], H[A-1])

ans = 0
for i in range(N):
  if(H[i]>max_h[i]):
    ans += 1
print(ans)
_ = int(input())
X = list(map(int, input().split()))

t = []
for i in range(min(X), max(X)):
  s = 0
  for x in X:
    s += (x - i) * (x - i)
  t.append(s)

print(min(t))

### FIXED CODE ###

_ = int(input())
X = list(map(int, input().split()))

t = []
for i in range(min(X), max(X) + 1):
  s = 0
  for x in X:
    s += (x - i) * (x - i)
  t.append(s)

print(min(t))
S=str(input())
K=int(input())

for i in range(K):
    if S[i] != '1':
        print(S[i])
        exit()
elif len(S) > K:
    print(S[K])
else:
    print(S[K-1])



### FIXED CODE ###

S=str(input())
K=int(input())

for i in range(K):
    if S[i] != '1':
        print(S[i])
        exit()
        
print(S[K-1])
import numpy as np
n,k=map(int,input().split())
h=np.array(list(map(int,input().split())))
dp=np.array([10**10]*(n+k))
dp[0]= 0
for i in range(n):
    dp[i+1:i+k+1]=np.minimum(dp[i+1:i+k+1],np.abs(h[i+1:i+k+1]-h[i])+dp[i])
print(dp[n-1])

### FIXED CODE ###

n,k=map(int,input().split())
h=list(map(int,input().split()))
m=max(h)*(n-1)
dp=[m]*n
dp[0]=0
for i in range(n):
  if i+1+k<=n:
    r=k
  else:
    r=n-i-1
  for kk in range(1,r+1):
    dp[i+kk]=min(dp[i+kk],dp[i]+abs(h[i+kk]-h[i]))
print(dp[n-1])
N, C = map(int, input().split())

A = [[0] * (10 ** 5 + 1) for i in range(C + 1)]
for i in range(N):
    s, t, c = map(int, input().split())
    A[c][s] += 1
    A[c][t + 1] -= 1
    
for i in range(C + 1):
    for j in range(1, 10 ** 5 + 1):
        A[i][j] += A[i][j - 1]
        
for j in range(10 ** 5 + 1):
    for i in range(1, C + 1):
        A[i][j] += A[i - 1][j]
        
print(max(A[-1]))

### FIXED CODE ###

N, C = map(int, input().split())
STC = [[int(i) for i in input().split()] for i in range(N)]
STC.sort()

R = [[STC[0][1], STC[0][2]]]
for s, t, c in STC[1:]:
    for i in range(len(R)):
        t_r, c_r = R[i][0], R[i][1]
        if c == c_r and t_r <= s:
            R[i] = [t, c]
            break
        if c != c_r and t_r < s:
            R[i] = [t, c]
            break
    else:
        R.append([t, c])
        
print(len(R))
K,T = map(int,input().split())
a = list(map(int,input().split()))

a = sorted(a,reverse = True)
ans = a.pop(0) - sum(a) - 1
if a >= 0:
    print(ans)
else:
    print(0)

### FIXED CODE ###

K,T = map(int,input().split())
a = list(map(int,input().split()))

a = sorted(a,reverse = True)
ans = a.pop(0) - sum(a) - 1
if ans >= 0:
    print(ans)
else:
    print(0)
import sys
import sys
import bisect
import collections
import fractions
import heapq
import math
from operator import mul
from functools import reduce
from functools import lru_cache


def combination(n, r):
    r = min(n - r, r)
    if r == 0:
        return 1
    else:
        return reduce(mul, range(n, n - r, -1)) // reduce(mul, range(1, r + 1))


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    n, k = list(map(int, input().rstrip('\n').split()))
    for i in range(k):
        print(combination(n - k + 1, i + 1) % mod * combination(k-1, i) % mod)


if __name__ == '__main__':
    solve()


### FIXED CODE ###

import sys
import bisect
import collections
import fractions
import heapq
import math
from operator import mul
from functools import reduce


def permutation(n, r):
    if r == 0:
        return 1
    else:
        return reduce(mul, range(n, n - r, -1))


def combination(n, r):
    r = min(n - r, r)
    if r == 0:
        return 1
    else:
        return reduce(mul, range(n, n - r, -1)) // reduce(mul, range(1, r + 1))


def fermat_s_little_theorem(denominator_no, molecule_no1, molecule_no2, mod):
    denominator = 1
    for i in range(1, denominator_no + 1):
        denominator = (denominator * i) % mod
    molecule = 1
    for i in range(1, molecule_no1 + 1):
        molecule = (molecule * i) % mod
    for i in range(1, molecule_no2 + 1):
        molecule = (molecule * i) % mod
    return denominator * pow(molecule, mod - 2, mod) % mod


def slove():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    n, k = list(map(int, input().rstrip('\n').split()))
    for i in range(1, k + 1):
        if k - 1 >= i - 1 and n - k + 1 >= i:
            print(combination(n - k + 1, i) % mod * combination(k-1, i-1) % mod)
        else:
            print(0)


if __name__ == '__main__':
    slove()
print(input().count(1))

### FIXED CODE ###

a = input()
print(a.count("1"))
import math
n = int(input())
t = map(int, input())
bottle_neck = min(t)[0]
ti = math.ceil(n/bottle_neck)
print(ti+4)


### FIXED CODE ###

#a,b,c = map(int,inpput().split(" "))
#n = int(input())
#print(a,b,c)
t=[]
for i in range(5):
    t.append(int(input()))
n = int(input())
flag = True
for i in range(5):
    for j in range(5-i-1):
        if abs(t[i]-t[j+i+1]) >n:
            flag =False
            break
if not flag:
    print(":(")
else:
    print("Yay!")
N,Q = map(int,input().split())
AB = [[] for _ in range(N-1)]
for n in range(N-1):
    AB[n] = list(map(int,input().split()))
PX = [[] for _ in range(Q)]
for q in range(Q):
    PX[q] = list(map(int,input().split()))
value = dict()
for px in PX:
    value.setdefault(px[0],0)
    value[px[0]] += px[1]
tree = dict()
for ab in AB:
    tree.setdefault(ab[0],[])
    tree[ab[0]].append(ab[1])
from collections import deque
Q = deque([1])
while Q:
    q = Q.pop()
    tree.setdefault(q,[])
    for c in tree[q]:
        value.setdefault(c,0)
        value[c] += value[q]
        Q.append(c)
ans = []
for n in range(N):
    ans.append(value[n+1])
print(*ans)

### FIXED CODE ###

N,Q = map(int,input().split())
AB = [[] for _ in range(N-1)]
for n in range(N-1):
    AB[n] = list(map(int,input().split()))
PX = [[] for _ in range(Q)]
for q in range(Q):
    PX[q] = list(map(int,input().split()))
graph = [[] for _ in range(N+1)]
for ab in AB:
    graph[ab[0]].append(ab[1])
    graph[ab[1]].append(ab[0])
val = [0] * (N+1)
for px in PX:
    val[px[0]] += px[1]
parent = [0] * (N+1)
from collections import deque
Q  = deque([1])
while Q:
    q = Q.popleft()
    for c in graph[q]:
        if c == parent[q]:
            continue
        parent[c] = q
        Q.append(c)
        val[c] += val[q]
print(*val[1:])
import math
a,b = map(int, input().split())
def lcm(x,y):
    return x*y / math.gcd(x,y)
print(lcm(a,b))

### FIXED CODE ###

import fractions
a,b = map(int, input().split())
def lcm(x,y):
    return x*y / fractions.gcd(x,y)
print(int(lcm(a,b)))
N=int(input())
lasta=0
headb=0
spec=0
cnt=0
for _ in range(N):
    s=str(input())
    for i in range(len(s)-1):
        if s[i:i+2]=="AB":
            cnt+=1
    if s[0]=="B" and s[-1]=="A":
        spec+=1
    elif s[-1]=="A":
        lasta+=1
    elif s[0]=="B":
        headb+=1
if abs(headb-lasta)>=spec:
    print(min(headb,lasta)+spec+cnt)
    
elif lasta=0 and headb=0:
    print(spec-1+cnt)
else:
    print(spec-abs(headb-lasta)+max(headb,lasta)+cnt)

### FIXED CODE ###

N=int(input())
lasta=0
headb=0
spec=0
cnt=0
for _ in range(N):
    s=str(input())
    for i in range(len(s)-1):
        if s[i:i+2]=="AB":
            cnt+=1
    if s[0]=="B" and s[-1]=="A":
        spec+=1
    elif s[-1]=="A":
        lasta+=1
    elif s[0]=="B":
        headb+=1
        
if abs(headb-lasta)>=spec:
    print(min(headb,lasta)+spec+cnt)   
elif lasta==0 and headb==0 and spec>0:
    print(spec-1+cnt)
elif lasta==0 and headb==0 and spec==0:
    print(cnt)
else:
    print(spec-abs(headb-lasta)+max(headb,lasta)+cnt)
s,t = map(str,input().split())
a,b = map(int,input().split())
u = str(input())

if s = u and not t = u:
    gap = a -1
    print(int(gap))
else:
    gap = b -1
    print(int(gap))s

### FIXED CODE ###

s,t = input().split()
a,b = map(int,input().split())
u = input()

if s == u:
    print(a -1,b)
else:
    print(a,b-1)
import sys
def input():
    return sys.stdin.readline()[:-1]
h,w=map(int,input().split())
s=[input() for i in range(h)]
# print(40**3)

def warshall_floyd(d):
    #d[i][j]: iからjへの最短距離
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j] = min(d[i][j],d[i][k] + d[k][j])
    return d

# n,w = map(int,input().split()) #n:頂点数　w:辺の数
n=h*w
d = [[float("inf") for i in range(h*w)] for i in range(h*w)]
# print(d)
#d[u][v] : 辺uvのコスト(存在しないときはinf)
for i in range(h):
    for j in range(w):
        if i+1<h:
            if s[i][j]!="#" and s[i+1][j]!="#":
                d[i*h+j][(i+1)*h+j]=1
                d[(i+1)*h+j][i*h+j]=1
        if j+1<w:
            if s[i][j]!="#" and s[i][j+1]!="#":
                d[i*h+j][i*h+j+1]=1
                d[i*h+j+1][i*h+j]=1
# for i in range(w):
#     x,y,z = map(int,input().split())
#     d[x][y] = 1
#     d[y][x] = 1
for i in range(h*w):
    d[i][i] = 0 #自身のところに行くコストは０
li=warshall_floyd(d)
ans=0
for i in range(len(li)):
    for j in range(len(li[i])):
        if li[i][j]!=float("inf"):
            ans=max(ans,li[i][j])

print(ans)

### FIXED CODE ###

import sys
def input():
    return sys.stdin.readline()[:-1]
h,w=map(int,input().split())
s=[input() for i in range(h)]
# print(40**3)

def warshall_floyd(d):
    #d[i][j]: iからjへの最短距離
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j] = min(d[i][j],d[i][k] + d[k][j])
    return d

# n,w = map(int,input().split()) #n:頂点数　w:辺の数
n=h*w
d = [[float("inf") for i in range(h*w)] for i in range(h*w)]
# print(d)
#d[u][v] : 辺uvのコスト(存在しないときはinf)
for i in range(h):
    for j in range(w):
        if i+1<h:
            if s[i][j]!="#" and s[i+1][j]!="#":
                d[i*w+j][(i+1)*w+j]=1
                d[(i+1)*w+j][i*w+j]=1
        if j+1<w:
            if s[i][j]!="#" and s[i][j+1]!="#":
                d[i*w+j][i*w+j+1]=1
                d[i*w+j+1][i*w+j]=1
# for i in range(w):
#     x,y,z = map(int,input().split())
#     d[x][y] = 1
#     d[y][x] = 1
for i in range(h*w):
    d[i][i] = 0 #自身のところに行くコストは０
# print(d)
li=warshall_floyd(d)
ans=0
for i in range(len(li)):
    for j in range(len(li[i])):
        if li[i][j]!=float("inf"):
            ans=max(ans,li[i][j])

print(ans)
x,y=map(int,input().split())
d=[[0]*x for i in range(y)]

def d(a,b):
  if a==1 and b==2:
    return 1
  elif a==2 and b==1:
    return 1
  elif a<1 and b<1:
    return 0
  return d(a-1,b-2)+d(a-2,b-1)

print(d(x,y)%(10**9+7))

### FIXED CODE ###

x,y=map(int,input().split())
mod = 10**9+7
flflag=True

if (2*x-y)%3==0:
  a=(2*x-y)//3
else:
  flflag=False
if (2*y-x)%3==0:
  b=(2*y-x)//3
else:
  flflag=False

def kaijou(n):
  ans = 1
  for i in range(1,n+1):
    ans*=i%mod
    ans%=mod  
  return ans
if flflag:
  N=a+b
  R=min(a,b)
ans=0
if flflag==True and a>=0 and b>=0:
  ans=kaijou(N)
  ans1= (kaijou(N-R)*kaijou(R))%mod
  print((ans*pow(ans1,mod-2,mod))%mod)
else:
  print(0)
a = int(input())

b = list(map(int, input().split()))
c = []
count = 0

for i in range(a-1):
    if b[i] >= b[i+1]:
        count += 1
    else:
        count = 0
    c.append(count)

print(max(c))

### FIXED CODE ###

a = int(input())

b = list(map(int, input().split()))
c = []
count = 0

if a == 1:
    print(0)
    exit()

for i in range(a-1):
    if b[i] >= b[i+1]:
        count += 1
    else:
        count = 0
    c.append(count)

print(max(c))
n, t = map(int, input().split())
c = 999
for i in range(n):
    tmp = input().split()
    if t <= tmp[1]:
        if tmp[0] < c:
            c = tmp[0]
if c == 999:
    print('TLE')
    exit()
else:
    print(c)

### FIXED CODE ###

n, t = map(int, input().split())
c = 10000
for i in range(n):
    tmp = input().split()
    if t >= int(tmp[1]):
        if int(tmp[0]) < c:
            c = int(tmp[0])
if c == 10000:
    print('TLE')
    exit()
else:
    print(c)
from math import sqrt
def isprime(inlst, i, sq):
	inlst = list(filter(lambda x: x % i is not 0 or x is i, inlst))
	if sq >= i:
		return isprime(inlst, i +2, sq)
	else:
		return inlst

n = int(input())
inlst = []
twonum = 0
for i in range(n):
	inlst.append(int(input()))
	if inlst[i] == 2:
			twonum += 1
	
inlst = list(filter(lambda x: x % 2 is not 0, inlst))
i = 3
maxin = max(inlst)
if len(inlst) > 0:
	inlst = isprime(inlst, i, int(sqrt(maxin)) + 1)
print(len(inlst) + twonum)

### FIXED CODE ###

from math import sqrt
def isprime(inlst, chk, sq):
	for i in range(3, sq, 2):
		inlst = [x for x in inlst if x%i > 0 or x == i]
		i += 2
	return inlst
n = int(input())
inlst = [input() for i in range(n)]
inlst = [int(i) for i in inlst]
inlst = [x for x in inlst if x%2 > 0 or x == 2]
inlst = isprime(inlst, 3, int(sqrt(max(inlst))) + 1)
print(len(inlst))
#coding: utf-8
N = int(input())
L = list(map(int, input().split()))

cnt = 0
tri_cnt = 0
mem = 0

#全てが奇数になるまで実行し続ける
while(tri_cnt != len(L)):
    if(L[mem]%2 != 0):
        mem += 1
    else:
        L[mem] /= 2
        for i in range(len(L)):
            if(i != mem):
                L[i] *= 3
        cnt += 1

    tri_cnt = 0
    for i in range(len(L)):
        if (L[i] % 2 != 0):
            tri_cnt += 1

else:
    print(cnt)

### FIXED CODE ###

#coding: utf-8
N = int(input())
L = list(map(int, input().split()))

cnt = 0
tri_cnt = 0
mem = 0

#全てが奇数になるまで実行し続ける
while(mem != len(L)):
    if(L[mem]%2 != 0):
        mem += 1
    else:
        L[mem] //= 2
        # for i in range(len(L)):
        #     if(i != mem):
        #         L[i] = L[i] * 3
        #         print('',end='')
        cnt += 1

    # tri_cnt = 0
    # for i in range(len(L)):
    #     if (L[i] % 2 != 0):
    #         tri_cnt += 1
else:
    print(cnt)
import heapq
n,k = map(int,input().split())
a = [int(i) for i in input().split()]

low = 1
high = 10**9

if n == 1:
    print((a[0]+k-1)//k)
    exit()

while low+1 < high:
    tmp = 0
    mid = (low + high) //2
    #print(mid)
    
    for i in range(n):
        tmp += ((a[i]+mid-1) // mid)-1
    
    if tmp <= k:
        high = mid
    else:
        low = mid
        
print(high)


### FIXED CODE ###

import heapq
n,k = map(int,input().split())
a = [int(i) for i in input().split()]

low = 0
high = 10**9

if k == 0:
    print(max(a))
    exit()

    
while low+1 < high:
    tmp = 0
    mid = (low + high) //2
    
    for i in range(n):
        tmp += ((a[i]+mid-1) // mid)-1
        
    if tmp <= k:
        high = mid
    else:
        low = mid
        
print(high)
from collections import defaultdict
N = int(input())
A = list(map(int,input().split()))
d = defaultdict(int)
for a in A:
    d[a-1] += 1
for i in range(N):
    print(d[i])


### FIXED CODE ###

from math import pi
R = int(input())
print(2*R*pi)
import math
n,d=input().split()
n=int(n)
d=int(d)
def combinations(n, r):
    return math.factorial(n)/(math.factorial(n-r)*math.factorial(r))
x=[]
if d==1:
  count=combinations(n,2)
  count = int(count)
else:
  for i in range(n):
    xa=[int(s) for s in input().split()]
    x.append(xa)
  a=[]
  for i in range(n-1):
    for j in range(i+1,n):
      t=[]
      for k in range(d):
        c=(x[i][k]-x[j][k])**2
        t.append(c)
        if k==d-1:
          a.append(sum(t))
  answer=list(map(lambda x:pow(x,0.5),a))
  count=0
  for l in range(n):
    if answer[l].is_integer()==True:
      count=count+1
print(count)

### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys

N, D = map(int, input().split())
s_lines = sys.stdin.readlines()

ans = 0
X_list_list = []
for s in s_lines:
    new_list = list(map(int, s.split()))
    for i in range(len(X_list_list)):
        sum_num = float(0)
        for idx, ite in enumerate(X_list_list[i]):
            sum_num += (new_list[idx] - ite) ** 2
        if pow(sum_num, 0.5).is_integer():
            ans += 1
    X_list_list.append(new_list)

print(ans)
N,x = map(int,input().split())
a = [int(i) for i in input.split()]
ans = 0
if a[0] > x:
  ans += (a[0]-x)
  a[0] = x
for i in range(N-1):
  if a[i] + a[i+1] > x:
    ans += (a[i]+a[i+1]-x)
    a[i+1] -= (a[i]+a[i+1]-x)
print(ans)

### FIXED CODE ###

N,x = map(int,input().split())
a = [int(i) for i in input().split()]
ans = 0
if a[0] > x:
  ans += (a[0]-x)
  a[0] = x
for i in range(N-1):
  if a[i] + a[i+1] > x:
    ans += (a[i]+a[i+1]-x)
    a[i+1] -= (a[i]+a[i+1]-x)
print(ans)
def solve():
    N, K = map(int,input().split())
    MOD = 10 ** 9 + 7
    fac, finv, inv = COMinit(N,MOD)
    ans = []
    for i in range(1,K+1):
        com1 = COM(K-1,i-1,MOD,fac,finv,inv)
        if N-K-(i-1) < 0:
            ans.append(0)
            continue
        com2 = COM(N-K+1,N-K-(i-1),MOD,fac,finv,inv)
        ans.append(com1*com2%MOD)
    
    print(*ans,sep='\n')

# COMの前処理
# テーブルを作る
# O(n)
def COMinit(N, mod):
    fac = [0] * N
    finv = [0] * N
    inv = [0] * N

    fac[0] = 1
    fac[1] = 1
    finv[0] = 1
    finv[1] = 1
    inv[1] = 1

    for i in range(2, N):
        fac[i] = fac[i-1] * i % mod
        inv[i] = mod - inv[mod%i] * (mod // i) % mod
        finv[i] = finv[i-1] * inv[i] % mod
    
    return fac, finv, inv

# nCrを計算 前処理としてCOMinitの実行が必要
# O(1)
def COM(n, r, mod, fac, finv, inv):
    if n < r:
        return 0
    if n < 0 or r < 0:
        return 0
    return fac[n] * (finv[r] * finv[n-r] % mod) % mod

if __name__ == '__main__':
    solve()

### FIXED CODE ###

def solve():
    N, K = map(int,input().split())
    MOD = 10 ** 9 + 7
    fac, finv, inv = COMinit(N+1,MOD)
    ans = []
    for i in range(1,K+1):
        com1 = COM(K-1,i-1,MOD,fac,finv,inv)
        if N-K-(i-1) < 0:
            ans.append(0)
            continue
        com2 = COM(N-K+1,N-K-(i-1),MOD,fac,finv,inv)
        ans.append(com1*com2%MOD)
    
    print(*ans,sep='\n')

# COMの前処理
# テーブルを作る
# O(n)
def COMinit(N, mod):
    fac = [0] * N
    finv = [0] * N
    inv = [0] * N

    fac[0] = 1
    fac[1] = 1
    finv[0] = 1
    finv[1] = 1
    inv[1] = 1

    for i in range(2, N):
        fac[i] = fac[i-1] * i % mod
        inv[i] = mod - inv[mod%i] * (mod // i) % mod
        finv[i] = finv[i-1] * inv[i] % mod
    
    return fac, finv, inv

# nCrを計算 前処理としてCOMinitの実行が必要
# O(1)
def COM(n, r, mod, fac, finv, inv):
    if n < r:
        return 0
    if n < 0 or r < 0:
        return 0
    return fac[n] * (finv[r] * finv[n-r] % mod) % mod

if __name__ == '__main__':
    solve()
#include<iostream>
using namespace std;

int main(){
	string s;
	cin>>s;
	int N=s.size();
	string ans;
	for(int i=0;i<N;i+=2) ans+=s[i];
		//in string, it means odd number
	cout<<ans<<endl;
}

### FIXED CODE ###

s=str(input())
l_s=[]
for i in range(len(s)):
	if((i+1)%2!=0):
		l_s.append(s[i])

odd=''.join(l_s)
print(odd)
print(-(-sum(int,input(),split))//2)

### FIXED CODE ###

a,b=map(int,input().split())
print(-((-a-b)//2))
from Queue import Queue
INF = 20000000
q = Queue()
dx = [-1, 0, 1, 0]
dy = [0, -1, 0, 1]
smp = [[INF for i in range(1002)] for j in range(1002)]
mp = [['X' for i in range(1002)] for j in range(1002)]
ipt = raw_input().split('\n')
H, W, n = map(int,ipt[0].split())
for i in range(1, H+1):
    for j in range(1, W+1):
        mp[i][j] = ipt[i][j-1];
x = y = 0
for i in range(1, H+1):
    for j in range(1, W+1):
        if mp[i][j]=='S':
            x = j; y = i;
c = 0; ans = 0;
q.put([x,y]); smp[y][x] = 0;
while c<n:
    p = q.get()
    x = p[0]; y = p[1];
    if mp[y][x]==chr(ord('1')+c):
        ans += smp[y][x]; c+=1;
        if c==n: break;
        while q.empty()==False: q.get()
        for i in range(1, H+1):
            for j in range(1, W+1):
                smp[i][j] = INF
        smp[y][x] = 0
    for i in range(4):
        if mp[y+dy[i]][x+dx[i]]!='X' and smp[y+dy[i]][x+dx[i]]==INF:
            q.put([x+dx[i], y+dy[i]]);
            smp[y+dy[i]][x+dx[i]] = smp[y][x]+1;
print(ans)

### FIXED CODE ###

from Queue import Queue
INF = 20000000
q = Queue()
dx = [-1, 0, 1, 0]
dy = [0, -1, 0, 1]
smp = [[INF for i in range(1002)] for j in range(1002)]
mp = [['X' for i in range(1002)] for j in range(1002)]
H, W, n = map(int,raw_input().split())
for i in range(1, H+1):
    ipt = raw_input()
    for j in range(1, W+1):
        mp[i][j] = ipt[j-1];
x = y = 0
for i in range(1, H+1):
    for j in range(1, W+1):
        if mp[i][j]=='S':
            x = j; y = i;
c = 0; ans = 0;
q.put([x,y]); smp[y][x] = 0;
while c<n:
    p = q.get()
    x = p[0]; y = p[1];
    if mp[y][x]==chr(ord('1')+c):
        ans += smp[y][x]; c+=1;
        if c==n: break;
        while q.empty()==False: q.get()
        for i in range(1, H+1):
            for j in range(1, W+1):
                smp[i][j] = INF
        smp[y][x] = 0
    for i in range(4):
        if mp[y+dy[i]][x+dx[i]]!='X' and smp[y+dy[i]][x+dx[i]]==INF:
            q.put([x+dx[i], y+dy[i]]);
            smp[y+dy[i]][x+dx[i]] = smp[y][x]+1;
print(ans)
import sys
S=(input())

key=['k','e','y','e','n','c','e']
ans=''
i=0
number=[]

if(S=="keyence"):
    print("YES")
    sys.exit()

for n,s in enumerate(S):
    if(s==key[i]):
        ans+=s
        i+=1
    else:
        number.append(n)

pre=number.pop(0)
a=pre
for n in number:
    if(pre!=(n-1)):
        print("NO")
        sys.exit()
    pre=n
if(ans!="keyence"):
    print('NO')
else:
    print('YES')

### FIXED CODE ###

def myAnswer(S:str) -> str:
   if(S == "keyence"):return "YES"
   for i in range(len(S)-1):
      for j in range(i+1,len(S)):
         if(S[:i]+S[j:] == "keyence"):
            return "YES"
   return "NO"

def modelAnswer():
   return
def main():
   S = (input())
   print(myAnswer(S))
if __name__ == '__main__':
   main()
n,m=map(int,input().split())
k=[list(map(int,input().split())) for i in range(m)]
p=list(map(int,input().split()))

cnt=0
for i in range(2**n):
  l=[0 for j in range(n)]
  for j in range(n):
    if (i>>j)&1:
      l[j]=1

  t_cnt0
  for j in range(m):
    on_l=0
    for x in k[j][1:]:
      x-=1
      if l[x]==1:
        on_l+=1
    if on_l%2==p[j]:
      t_cnt+=1

  if t_cnt==m:
    cnt+=1

print(cnt)

### FIXED CODE ###

n,m=map(int,input().split())
l=[list(map(int,input().split())) for i in range(m)]
p=list(map(int,input().split()))

ans=0
for i in range(2**n):
#  bit=format(i,'011b')
#  bit=list(reversed(format(i,'b')))
#  bit=bin(i)
#  print(bit)
  #ある電球
  num=0
  for j in range(m):
    #ある電球に接続されている各スイッチ
    cnt=0
    for k in range(1,l[j][0]+1):
#      print(l[j][k])
#      if bit[l[j][k]]==1:
#      if (i>>k)&1:
#      print(i,l[j][k])
      if (i>>l[j][k]-1)&1:
        cnt+=1
#    print(i,j,cnt)
    if cnt%2==p[j]:
      num+=1
  if num==m:
    ans+=1
print(ans)