Harryxun/stf_run huggingface dataset:
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
from operator import xor

import numpy as np
import re
import sys

sys.setrecursionlimit(10000)
INF = float('inf')

N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
print(reduce(xor, np.add.outer(A, B).flat))

### FIXED CODE ###

import bisect
import functools
import os
import sys

sys.setrecursionlimit(10000)
INF = float('inf')

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


def debug(fn):
    if not os.getenv('LOCAL'):
        return fn

    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        ret = fn(*args, **kwargs)
        print('DEBUG: {}({}) -> '.format(
            fn.__name__,
            ', '.join(
                list(map(str, args)) +
                ['{}={}'.format(k, str(v)) for k, v in kwargs.items()]
            )
        ), end='')
        print(ret)
        return ret

    return wrapper


@debug
def calc_bit(k):
    """
    答えの下から k ビット目を返す
    :param int k:
    :return:
    """
    # 答えの k ビット目が偶数なら 0、奇数なら 1

    # これ以上の桁は不要
    mod = 1 << (k + 1)
    amod = [a & (mod - 1) for a in A]
    bmod = [b & (mod - 1) for b in B]
    amod.sort()
    bmod.sort()
    ret = 0

    # bmod + amod のうち k ビット目が 1 となる数
    # => (1 << k) 以上 (2 << k) 未満または (3 << k) 以上 (4 << k) 未満
    # しゃくとる
    b01 = bisect.bisect_left(bmod, (1 << k) - amod[0])
    b10 = bisect.bisect_left(bmod, (2 << k) - amod[0])
    b11 = bisect.bisect_left(bmod, (3 << k) - amod[0])
    for a in range(len(amod)):
        while b01 - 1 >= 0 and bmod[b01 - 1] >= (1 << k) - amod[a]:
            b01 -= 1
        while b10 - 1 >= 0 and bmod[b10 - 1] >= (2 << k) - amod[a]:
            b10 -= 1
        while b11 - 1 >= 0 and bmod[b11 - 1] >= (3 << k) - amod[a]:
            b11 -= 1
        # (1 << k) 以上 (2 << k) 未満
        ret += b10 - b01
        # (3 << k) 以上 (4 << k) 未満
        ret += len(bmod) - b11

    return ret % 2


ans = 0
for i in range(30):
    ans += calc_bit(i) * (2 ** i)
print(ans)
N,K = map(int,input().split())
li = [int(i) for i in input().split()]
total = 0

for _ in range(K):
	total += min(li)
	li = li.remove(min(li))

print(total)

### FIXED CODE ###

N,K = map(int,input().split())
li = [int(i) for i in input().split()]
total = 0
 
for _ in range(K):
	total += min(li)
	li.remove(min(li))
 
print(total)
n = int(input())
s = input()
a = []
#  .##..#.##.
w = s.count(".")
b = s.count("#")
m = min(w,b)

bb=0

for i in range(n):
    if s[i]=='.':
        w-=1
    if s[i]=='#':
        bb += 1
        a.append(bb+w)
n=min(a)
print(min(m,n))


### FIXED CODE ###

n = int(input())
s = input()

a = []
#  .##..#.##.
w = s.count(".")
b = s.count("#")
m = min(w,b)

bb=0

for i in range(n):
    if s[i]=='.':
        w-=1
        a.append(bb+w)
    if s[i]=='#':
        bb += 1
        a.append(bb+w)
if len(a)>0:
    I = min(a)
    print(min(m,I))
else:
    print(m)
n,m=map(int,input().split())
l=" ".join([input() for _ in [0]*m])
for i in range(i,n+1):print(s.split().count(str(i)))

### FIXED CODE ###

n,m=map(int,input().split())
l=" ".join([input() for _ in [0]*m])
for i in range(1,n+1):print(l.split().count(str(i)))
from math import factorial
import sys
N,M=map(int,input().split())
ANS=0
A=int(input())
list1=[A]
DAN=A
B=DAN-DAN//2
for k in range(B):
  a = factorial(B) / factorial(k) / factorial(B - k)
  ANS+=a
for i in range(1,M):
  A=int(input())
  list1+=[A]
  DAN=A-list1[i-1]-1
  B=DAN-DAN//2
  if A==list1[i-1] or A==list1[i-1]+1:
    print(0)
    sys.exit()
  for k in range(B):
    a = factorial(B) / factorial(k) / factorial(B - k)
    ANS+=a
DAN=N-A-1
B=DAN-DAN//2
for t in range(B):
  a = factorial(B) / factorial(t) / factorial(B - t)
  ANS+=a
print(int(ANS)%1000000007)

### FIXED CODE ###

import sys
N,M=map(int,input().split())
dp=[1]*N
listA=[]
for i in range(M):
  a=int(input())
  listA+=[a]
  dp[a-1]=0
for i in range(1,M):
  if listA[i]==listA[i-1]:
    print(0)
    sys.exit()
setA=set(listA)    
if (1 not in setA) and (2 not in setA) and N!=1:
  dp[1]=2
for i in range(2,N):
  if i+1 not in setA:
    dp[i]=dp[i-1]+dp[i-2]
ans=dp[-1]%(10**9+7)
print(ans)
n,k = map(int,input().split())         # n=町の個数 , k=テレポート回数
a_list = map(list(input().split()))         # 各町のテレポート先リスト
dum = a_list[0]                        # dum=次のテレポート先
k = k - 1                              # テレポート回数をデクリメント
ans_list = [1]                         # 訪れた町を ans_list に格納
while(1):
    #print(dum,ans_list)
    if ans_list.count(dum) == 1:
        ind = ans_list.index(dum)
        loop = ans_list[ind:]
        len_loop = len(loop)
        k = k % len_loop
        ans_list = []
        #print("ok")

    if k == 0:
        print(int(dum))
        break
    ans_list = ans_list.append(dum)
    dum = a_list[int(dum)-1]
    k = k - 1



### FIXED CODE ###

n,k = map(int,input().split())         # n=町の個数 , k=テレポート回数
a_list = list(map(int,input().split()))     # 各町のテレポート先リスト
dum = a_list[0]                        # dum=次のテレポート先
k = k - 1                              # テレポート回数をデクリメント
ans_list = [1]                         # 訪れた町を ans_list に格納
ok = True
check_list = n*[0]
check_list[0] = 1
for i in range(k+1):
    if ok and check_list[dum-1] == 1:
        #print(dum,111)
        ind = ans_list.index(dum)
        loop = ans_list[ind:]
        len_loop = len(loop)
        k = k % len_loop
        ans_list = []
        ok = False
    else:
        check_list[dum-1] = 1

    if k == 0:
        print(int(dum))
        break
    ans_list.append(dum)
    dum = a_list[int(dum)-1]
    k = k - 1
import sys
input = sys.stdin.readline

def main():
    n = int(input())
    s_li = list(input().rstrip())

    r_li = []
    g_li = []
    b_li = []

    for i in range(n):
        if s_li[i] == 'R':
            r.append(i)
        elif s_li[i] == 'G':
            g.append(i)
        elif s_li[i] == 'B':
            b.append(i)

    if (len(r_li) < 1 or len(g_li) < 1) or len(b_li) < 1:
        print(0)
    else:
        all_c = len(r_li) * len(g_li) * len(b_li)

        for i in range(n):
            for j in range(i+1,n):
                k = 2*j-i
                if k >= n:
                    continue

                if (s_li[i] != s_li[j] and s_li[j] != s_li[k]) and s_li[i] != s_li[k]:
                    all_c -= 1

        print(all_c)

if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
input = sys.stdin.readline

def main():
    n = int(input())
    li = list(input().rstrip())

    r = []
    g = []
    b = []

    for i in range(n):
        if li[i] == 'R':
            r.append(i)
        elif li[i] == 'G':
            g.append(i)
        elif li[i] == 'B':
            b.append(i)

    if (len(r) < 1 or len(g) < 1) or len(b) < 1:
        print(0)
    else:
        all_c = len(r) * len(g) * len(b)

        for i in range(n):
            for j in range(i+1,n):
                k = 2*j-i
                if k >= n:
                    continue

                if (li[i] != li[j] and li[j] != li[k]) and li[i] != li[k]:
                    all_c -= 1

        print(all_c)

if __name__ == '__main__':
    main()
x,y,a,b,c=map(int,input().split())
p=list(map(int,input().split()))
q=list(map(int,input().split()))
r=list(map(int,input().split()))

p.sort()
q.sort()
r.sort()


red=0
for _ in range(x):
	pMax=max(p)
	rMax=max(r)
	if pMax >rMax:
		red+=pMax
		p.pop(p.index(pMax))
	else:
		red+=rMax
		r.pop(r.index(rMax))

white=0
for _ in range(y):
	qMax=max(q)
	rMax=max(r)
	if qMax >rMax:
		red+=qMax
		q.pop(q.index(qMax))
	else:
		red+=rMax
		r.pop(r.index(rMax))

print(white+red)

### FIXED CODE ###

x,y,a,b,c=map(int,input().split())
p=list(map(int,input().split()))
q=list(map(int,input().split()))
r=list(map(int,input().split()))

p.sort(reverse=True)
q.sort(reverse=True)
r.sort(reverse=True)

p=p[:x]
q=q[:y]

p.extend(q)#白なし
p.sort()
r=r[:x+y]# able add
lenR=len(r)

temp=p[:lenR]# 白なしの小さいものたち
temp.extend(r)#白と前の小さい者たちの合計
temp.sort(reverse=True)
temp=temp[:lenR]#白ありでのMAX

print(sum(p[lenR:])+sum(temp))
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c　= a * b
if c % 2 == 1:
  print("Odd")
else:
  print("Even")


### FIXED CODE ###

# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = (a * b) % 2
if c == 0:
  print("Even")
else :
  print("Odd")
#!/usr/bin/env python
def input():
    return sys.stdin.readline()[:-1]

def main():
    K, N = map(int, input().split())
    A = tuple(map(int, input().split()))
    tmp = 0
    for i in range(N-1):
        tmp = max(tmp, A[i+1] - A[i])

    tmp = max(tmp, (K-A[N-1]+A[0]))
    print(K-tmp)

if __name__ == '__main__':
    main()

### FIXED CODE ###

#!/usr/bin/env python
import sys
def input():
    return sys.stdin.readline()[:-1]

def main():
    K, N = map(int, input().split())
    A = tuple(map(int, input().split()))
    tmp = 0
    for i in range(N-1):
        tmp = max(tmp, A[i+1] - A[i])

    tmp = max(tmp, (K-A[N-1]+A[0]))
    print(K-tmp)

if __name__ == '__main__':
    main()
H, W = map(int, input().split())
graph = []
for _ in range(H):
    graph.append([0 if e == '.' else 1 for e in list(input())])

res = True

for i in range(1, W-1):
    for j in range(1, H-1):
        if graph[i][j] == 1 and graph[i + 1][j] == 0 and graph[i - 1][j] == 0 and graph[i][j + 1] == 0 and graph[i][j - 1] == 0:
            res = False
print('Yes' if res else 'No')


### FIXED CODE ###

H, W = map(int, input().split())
graph = []
for _ in range(H):
    graph.append(list(input()))

res = True

for j in range(1, W-1):
    for i in range(1, H-1):
        if graph[i][j] == '#' and graph[i + 1][j] == '.' and graph[i - 1][j] == '.' and graph[i][j + 1] == '.' and graph[i][j - 1] == '.':
            print('No')
            exit()
print('Yes')
import math

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#a,bの最小公倍数
def lcm(a, b):
    return a * b // gcd (a, b)


a, b = map(int, input().split())
print((a * b) // math.gcd(a, b))


### FIXED CODE ###

import math

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#a,bの最小公倍数
def lcm(a, b):
    return a * b // gcd (a, b)


a, b = map(int, input().split())
print(lcm(a, b))
n, k = map(int, input().split())
m = n
while m > 0:
  n = min(abs(n - k), n)
  if m > n:
      m = n
  else:
      print(n)
      break

### FIXED CODE ###

a, b, c = map(int, input().split())
print(c, a, b)
K, S = map(int, input().split())

count = 0
for i in range(K+1) :
    for j in range(K+1) :
        if S < x + y :
            break
        if S - i - j <= K :
            count += 1
print(count)


### FIXED CODE ###


K, S = map(int, input().split())

count = 0
for i in range(K+1) :
    for j in range(K+1) :
        if S < i + j :
            break
        if S - i - j <= K :
            count += 1

print(count)
N = int(input())
A = list(map(int,input().split()))
ans = []

for i in range(N-1):
    if A[i] > A[i+1]:
        youso = A[i] - A[i+1]
        A[i+1] += youso
        ans.append(youso)
        print(ans)
    else:
        pass

print(sum(ans))


### FIXED CODE ###

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

for i in range(N-1):
    if A[i] > A[i+1]:
        youso = A[i] - A[i+1]
        A[i+1] += youso
        ans.append(youso)
    else:
        pass

print(sum(ans))
# -*- coding: utf-8 -*-
N,L = list(map(int, input().split()))
l=[]
for i in range(N*L):
    l.append(input())
l.sort()
print(l)

### FIXED CODE ###

# -*- coding: utf-8 -*-
A_B_C = list(map(int, input().split()))
A_B_C.sort()
if A_B_C == [5,5,7]:
    print('YES')
else:
    print('NO')
N = int(input())
div = 1e9+7
ans = 1
for i in range(1,N+1):
    ans*=i
print(ans%div)

### FIXED CODE ###

import math
N = int(input())
print(math.factorial(N) % (10**9+7))
def main():


    from collections import deque


    h ,w = map(int, input().split())
    a = [ list(input())  for _ in range(h)]

    q = deque()

    if a[0][0]=='.':
        q.appendleft((0,0,0))
    else:
        q.appendleft((0,0,1))

    while(True):
        f = q.popleft()
        x, y, c = f[0], f[1], f[2]
        if (x,y) == (w-1,h-1):
            print(c)
            break

        for u, v in [(1,0), (0,1)]:
            if x + u <= w - 1 and y + v<= h - 1:
                n = a[x+u][y+v]=='.'
                if n:
                    q.appendleft((x + u, y + v, c + 0))
                else:
                    q.append((x + u, y + v, c + 1))



if __name__=='__main__':
    main()


### FIXED CODE ###

a,b = map(int,input().split())

if a == b:
  print("Yes")
else:
  print("No")
# -*- coding: utf-8 -*- 


number, length = map(int, input().split())
lst = []
for n in range(number):
    s = input()
    #print(s)
    lst.append(s)
    #print(lst)

lst.sort()
moji = ""
for n in lst:
    moji += n
print(moji)


### FIXED CODE ###

# -*- coding: utf-8 -*-

input_list = input().split()

cnt7 = 0
cnt5 = 0

for n in input_list:
    if int(n) == 7:
        cnt7 += 1
    elif int(n) == 5:
        cnt5 += 1
    else:
        continue
if cnt7 == 1 and cnt5 == 2:
    print("YES")
else:
    print("NO")
a=input()
b=input()
c=input()
d=input()
e=input()
k=input()
inp=[a,b,c,d,e]
i=0;
j=0;
kek=true
while i<5:
  j=i
  while j<5:
    if inp[j]-inp[i]>k:
      kek=false
      
print("Yay!") if kek else print(":(")      

### FIXED CODE ###

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if (e-a)> k:
  print(":(")
else:
  print("Yay!")
C11,C12,C13 = input().split()
C21,C22,C23 = input().split()
C31,C32,C33 = input().split()
 
print(C11 + C22 + C33)

### FIXED CODE ###

C1= input()
C2= input()
C3= input()

print(C1[0] + C2[1] + C3[2])
#93b
a,b,k=map(int,input().split())
ans=range(a,b+1)
for i in sorted(set(a[:k])):
    print(i)
for i in sorted(set(a[-k:])):
    print(i)

### FIXED CODE ###

#93a
s=set(input())
x=set(list('abc'))


print('Yes' if s==x else 'No')
xs[5] = []
for i in range(5):
  xs.append(int(input()))
  if not xs[i] == i:
    print i
    break


### FIXED CODE ###

xs = [int(e) for e in input().split()]
for i in range(5):
  if not xs[i] == i+1:
    print(i+1)
    break
n, m = map(int, input().split())

a = map(int, input().split())
bc = [[int(i) for i in input().split()] for i in range(m)]

for i in range(m):
        a.sort()
        bc_temp = bc[i]
        for j in range(bc_temp[0]):
                if a[j] < bc_temp[1]:
                        a[j] = bc_temp[1]

print(sum(a)) 

### FIXED CODE ###

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

bc.sort(key = lambda x:x[1], reverse = True)

a.sort()

a_count = 0
for b, c in bc:
        if c > a[a_count]:
                for i in range(b):
                        if c > a[a_count]:
                                a[a_count] = c
                                a_count += 1    
                        else:
                                break
                        if a_count == n:
                                        break

        else:
                break
        if a_count == n:
                break        

print(sum(a))
s = input()
box = ["A", "G", "C", "T"]

ACGTbox = str()
for i in range(0, len(S)):
    for j in range(i, len(S)):
        if S[j] in box:
            s += S[j]
        else:
            break
    if len(s) > len(ACGTbox):
        
        ACGTbox = s 
    s = str()
print(len(ACGTbox))

### FIXED CODE ###

# -*- coding: utf-8 -*-
S = str(input())
box = ["A", "G", "C", "T"]
s = str()
ACGTbox = str()
for i in range(0, len(S)):
    for j in range(i, len(S)):
        if S[j] in box:
            s += S[j]
        else:
            break
    if len(s) > len(ACGTbox):
        
        ACGTbox = s 
    s = str()
print(len(ACGTbox))
if 7 in N:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

x = input()
if "7" in x:
  print('Yes')
else:
  print('No')
H,W = map(int,input().split())
src = [input() for i in range(H)]
ans = []
for row in src:
    ans.append(list(row))
dxy=[(-1,-1),(-1,0),(-1,1),(0,-1),(0,1),(1,-1),(1,0),(1,1)]
for i in range(H):
    for j in range(W):
        c=0
        if src[i][j]=="#": continue
        for dx,dy in dxy:
            if j+dx<0 or j+dx>W-1 or i+dy<0 or i+dy>H-1: continue
            if src[j+dx][i+dy]=="#":
                c+=1
        ans[i][j]=c
for row in ans:
    print("".join(list(map(str,row))))

### FIXED CODE ###

H,W = map(int,input().split())
src = [input() for i in range(H)]

ans = []
for row in src:
    ans.append(list(row))

dxy = [(-1,-1),(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1)]
for y in range(H):
    for x in range(W):
        if ans[y][x] == '#': continue
        c = 0
        for dx,dy in dxy:
            if x+dx < 0 or x+dx > W-1 or y+dy < 0 or y+dy > H-1: continue
            if ans[y+dy][x+dx] == '#': c += 1
        ans[y][x] = c

for row in ans:
    print("".join(list(map(str,row))))
import sys
input = lambda: sys.stdin.readline().rstrip("\r\n")

n, k = map(int, input().split())
p = [int(x) - 1 for x in input().split()]
c = [int(x) for x in input().split()]

ans = -float('inf')
for i in range(n):
    now = i
    cnt = 0
    c_sum = [0]
    s = set()
    while True:
        s.add(now)
        c_sum.append(c_sum[-1] + c[now])
        now = p[now]
        cnt += 1
        if now in s:
            break
    if k <= cnt:
        ans = max(ans, max(c_sum[1: min(k + 1, len(c_sum) - 1)]))
    else:
        temp = c_sum[-1]
        q = k // cnt
        temp *= q
        q = k - q*cnt
        temp += max(c_sum[1:min(q + 1, len(c_sum) - 1)])
        ans = max(ans, temp, max(c_sum[1:]))
print(ans)




    

### FIXED CODE ###

import sys
input = lambda: sys.stdin.readline().rstrip("\r\n")

n, k = map(int, input().split())
p = [int(x) - 1 for x in input().split()]
c = [int(x) for x in input().split()]

ans = -float('inf')
for i in range(n):
    now = i
    c_sum = [0]
    s = set()
    cnt = 0
    while True:
        s.add(now)
        c_sum.append(c_sum[-1] + c[now])
        cnt += 1
        now = p[now]
        if now in s:
            break
    c_sum = c_sum[1:]
    if k < cnt:
        ans = max(ans, max(c_sum[: k]))
    else:
        score = c_sum[-1]
        count = k // cnt
        k_ = k - count*cnt
        score *= count
        score_2 = score - c_sum[-1]
        score_2 += max(c_sum)
        if k_ > 0:
            score += max(0, max(c_sum[:k_]))
        ans = max(ans, score, max(c_sum), score_2)
print(ans)
H, W = map(int,input().split())

if (H==1 or W==1):
    print(0)
else:
    if (h!=0 and w !=0):
        print((2*(H//2)+1)*(W//2) + H//2+1)

    if (h==0 and w == 0):
        print((2*(H//2))*(W//2))

    if (h!=0 and w == 0):
        print((2*(H//2)+1)*(W//2))

    if (h ==0 and w !=0):
        print((2*(H//2))*(W//2) + H//2)

### FIXED CODE ###

H, W = map(int,input().split())

if H==1 or W==1:
    print(1)
else:
    print((H*W+1)//2)
#!/usr/bin python3
# -*- coding: utf-8 -*-

n, k = map(int, input().split())
p = [int(i)-1 for i in input().split()]
c = list(map(int, input().split()))

rc = [0] * n
rp = [0] * n
for i in range(n):
    if rc[i]!=0:
        continue
    else:
        nw = set([i])
        np = c[i]
        nx = p[i]
        while not nx in nw:
            nw.add(nx)
            np += c[nx]
            nx = p[nx]
        cnt = len(nw)
        for x in nw:
            rc[x] = cnt
            rp[x] = np
ret = - 10 ** 18
for i in range(n):
    if rc[i] == 1:
        if rp[i]>=0:
            ret = max(ret, k*rp[i])
        else:
            ret = max(ret, rp[i])
        continue
    pseq = [0]
    nx = p[i]
    for j in range(1,rc[i]+1):
        pseq.append(pseq[-1]+c[nx])
        nx = p[nx]
    pseq = pseq[1:]
    if k <= rc[i]:
        ret = max(ret, max(pseq[:k]))
    elif rp[i] < 0:
        ret = max(ret, max(pseq))
    else:
        tmp = max(pseq)
        tmp = max(tmp, rp[i] + max(pseq[:k%rc[i]]))
        tmp += rp[i]*(k//rc[i]-1)
        ret = max(ret, tmp)
print(ret)

### FIXED CODE ###

#!/usr/bin python3
# -*- coding: utf-8 -*-

n, k = map(int, input().split())
p = [int(i)-1 for i in input().split()]
c = list(map(int, input().split()))

ret = - 10 ** 18
for s in range(n):
    nxt = p[s]
    S = [c[nxt]]
    while nxt != s:
        nxt = p[nxt]
        S.append(S[-1]+c[nxt])

    if k<=len(S):
        pt = max(S[:k])
    else:
        if S[-1] <= 0:
            pt = max(S)
        else:
            pt = max(S)
            if k%len(S)!=0:
                pt = max(pt, S[-1]+max(S[:k%len(S)]))
            pt += S[-1]*(k//len(S)-1)
    ret = max(ret, pt)
print(ret)
d,n = map(int,input().split())
if d == o:
  print(n)
elif d == 1:
  print(100*n)
elif d == 2:
  print(10000*n)

### FIXED CODE ###

d,n = map(int,input().split())
if d == 0 and 1<=n<=99:
  print(n)
elif d == 0 and n ==100:
  print(101)
elif d == 1 and 1<=n<=99:
  print(100*n)
elif d == 1 and n ==100:
   print(101*n)
elif d == 2 and 1<=n<=99:
  print(10000*n)
elif d == 2 and n ==100:
   print(10100*n)
N, K, C = map(int, input().split())
S = input()

Sr = "".join(list(reversed(S)))

wd = []
wdl = []

pw = 0
pwl = 0

for d in range(K):

    # 先詰めを探す
    while True:
        if S[pw] == ('o'):
            wd.append(pw)
            break
        pw += 1
    pw += C + 1
    
    # 後詰めを探す
    while True:
        if Sr[pwl] == ('o'):
            wdl.append(pwl)
            break
        pwl += 1
    pwl += C + 1

en = time.time()

wdl.sort()
    
for i in range(K):
    if wd[i] == wdl[i]:
        print(wd[i] + 1)

### FIXED CODE ###

N, K, C = map(int, input().split())
S = input()

Sr = "".join(list(reversed(S)))

wd = []
wdl = []

pw = 0
pwl = 0

for d in range(K):

    # 先詰めを探す
    while True:
        if S[pw] == ('o'):
            wd.append(pw)
            break
        pw += 1
    pw += C + 1
    
    # 後詰めを探す
    while True:
        if Sr[pwl] == ('o'):
            wdl.append((N-1) - pwl)
            break
        pwl += 1
    pwl += C + 1

wdl.sort()
    
for i in range(K):
    if wd[i] == wdl[i]:
        print(wd[i] + 1)
inl = list(map(str, input().split()))

stack = []
for n in inl:
    if n == '+':
        stack.append(stack.pop() + stack.pop())
    elif n == '-':
        a = stack.pop()
        b = stack.pop()
        stack.append(b - a)
    elif n == '*':
        stack.append(stack.pop() * stack.pop())
    else:
        stack.append(int(n))
print(stack.pop())u


### FIXED CODE ###

inl = list(map(str, input().split()))

stack = []
for n in inl:
    if n == '+':
        stack.append(stack.pop() + stack.pop())
    elif n == '-':
        a = stack.pop()
        b = stack.pop()
        stack.append(b - a)
    elif n == '*':
        stack.append(stack.pop() * stack.pop())
    else:
        stack.append(int(n))
print(stack.pop())
import math
N,K = map(int, input().split())
if N == 2 and K != 0:
    print(-1)
    exit()
if K > math.factorial(N-1) // (math.factorial(N - 1 - 2) * math.factorial(2)):
    print(-1)
    exit()

for i in range(2,N+1):
    print(1,i)

for i in range(3,K+3):
    print(2,i)

### FIXED CODE ###

import math
N,K = map(int, input().split())
M = (N-1)*(N-2)//2
if K > M:
    print(-1)
    exit()

print(N-1+M-K)
for i in range(2,N+1):
    print(1,i)
s = 2
d = 3
for i in range(M-K):
    print(s,d)
    d+=1
    if d > N:
        s+=1
        d = s+1
S = input()
d = {}
for s in S:
  d[s] = True
  
if 'N' in d:
  if 'S' not in d:
    print 'No'
    exit()
    
if 'S' in d:
  if 'N' not in d:
    print 'No'
    exit()

if 'E' in d:
  if 'W' not in d:
    print 'No'
    exit()
    
if 'W' in d:
  if 'E' not in d:
    print 'No'
    exit()  
    
print 'Yes'

### FIXED CODE ###

S = input()
d = {}

for s in S:
  d[s] = True

if 'N' in d:
  if 'S' not in d:
    print("No")
    exit()
    
if "S" in d:
  if 'N' not in d:
    print("No")
    exit()

if "E" in d:
  if "W" not in d:
    print("No")
    exit()
    
if "W" in d:
  if "E" not in d:
    print("No")
    exit()  
    
print("Yes")
S = input()
T = input()

if S == [T:-1]:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

S = input()
T = input()

for i, s in enumerate(S):
    if s != T[i]:
        print("No")
        break
else:
    print("Yes")