Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

n, k = [int(s) for s in input().split()]

e_list = [(int(s) + 1) / 2 for s in input().split()]
e_sum_list = e_list[:]

for _ in range(k - 1):
    e_list.pop(0)
    e_sum_list = [a + b for a, b in zip(e_sum_list, e_list)]

ans = max(e_sum_list)
print(ans)

### FIXED CODE ###

n, k = [int(s) for s in input().split()]

e_list = [(int(s) + 1) / 2 for s in input().split()]

temp = sum(e_list[:k])
ans = temp

for i in range(k, n):
    temp = temp - e_list[i - k] + e_list[i]
    if temp > ans:
        ans = temp

print(ans)
### BUGGY CODE ###

import statistics
n = int(input())
a_list = list(map(int, input().split()))

pro_list = [a_list[i-1] - i for i in range(1, n+1)]
ave = int(statistics.mean(pro_list))

b_list = [ave - 1 for i in range(5000)] + [ave + i for i in range(5000)]

ans = [sum([abs(pro-b)for pro in pro_list]) for b in b_list]
print(min(ans))

### FIXED CODE ###

import statistics
n = int(input())
a_list = list(map(int, input().split()))

pro_list = [a_list[i-1] - i for i in range(1, n+1)]
ave = int(statistics.mean(pro_list))
med = int(statistics.median(pro_list))
b_list = [ave - 1 for i in range(10)] + [ave + i for i in range(10)]
b_list += [med - 1 for i in range(10)] + [med + i for i in range(10)]

ans = [sum([abs(pro-b)for pro in pro_list]) for b in b_list]
print(min(ans))
### BUGGY CODE ###

S=input()
Q=int(input())
import sys
flag=False
 
for _ in range(Q):
  s = list(sys.stdin.readline())
  if s[0]=="1":
    if flag:
      flag=False
    else:
      flag=True
  else:
    if s[2]=="1":
      if flag:
        S=S+s[4]
      else:
        S=s[4]+S        
    else:
      if flag:
        S=s[4]+S
      else:              
        S=S+s[4]
        
if flag:
  S=S[::-1]
print(S)

### FIXED CODE ###

S=input()
Q=int(input())
import sys
from collections import deque
d=deque()
for _ in S:
  d.append(_)
flag=False

for _ in range(Q):
  s = list(sys.stdin.readline())
  if s[0]=="1":
    if flag:
      flag=False
    else:
      flag=True
  else:
    if s[2]=="1":
      if flag:
        d.append(s[4])
      else:
        d.appendleft(s[4])
    else:
      if flag:
        d.appendleft(s[4])
      else:
        d.append(s[4])
      
if flag:
  d.reverse()
  
print("".join(d))
### BUGGY CODE ###

n=int(input())
a=list(map(int,input().split()))
w=[]
for i in range(1,n+1):
  ans=a.index(i)+1
  w.append(ans)
for i in w:
  print(i)

  


### FIXED CODE ###

n = int(input())
num_list = list(map(int,input().split()))
num_array = [0]*n
for i in range(n):
    num_array[num_list[i]-1] = i+1
for i in range(n):
    print(num_array[i])
### BUGGY CODE ###

n = int(input())
sis = []
sin = []
for i in range(n):
  si = sorted(input())
  if not si in sis:
    sis.append(si)
    sin.append(1)
  else:
    sin[sis.index(si)] += 1
ans = 0
for j in sin:
  for k in range(1, j):
    ans += k
print(ans)



### FIXED CODE ###

from collections import Counter
n = int(input())
sis = []
for i in range(n):
  si = sorted(input())
  si = ''.join(si)
  sis.append(si)
C = Counter(sis)
ans = 0
for v in C.values():
  ans += sum(range(1, v))
print(ans)
### BUGGY CODE ###

N = int(input())
S = input()

r , g, b = S.count("R"), S.count("G"), S.count("B")
ans = r * g * b

for i in range(N-2):
    for j in range(i+1, N-1):
        k = 2*(j+1) - (i+1) # j > iより k = 2j - i > j
        if k > N:continue
        if S[i] != S[j] and S[j] != S[k-1] and S[k-1] != S[i]:
        	ans -= 1
print(ans)

### FIXED CODE ###

N = int(input())
S = input()

r , g, b = S.count("R"), S.count("G"), S.count("B")
ans = r * g * b

for i in range(N-2):
    for d in range(N//2+1):
        j = i + d
        k = j + d
        if k >= N:break
        if S[i] != S[j] and S[j] != S[k] and S[k] != S[i]:
            ans -= 1
print(ans)
### BUGGY CODE ###

n = int(input())
a = list(map(int, input().split()))
for j in range(n):
    a[j] = a[j] - (j + 1)
a.sort()
asum = sum(a)
sadlist = [asum - n * a[0]]
for i in range(1, n+1):
    sad = asum - 2 * sum(a[:i])
    if i < n/2:
        sad = sad - (n - 2 * i) * a[i]
    elif i > n/2:
        sad = sad - (n - 2 * i) * a[i-1]
    else:
        break
    sadlist.append(sad)
print(min(sadlist))

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
for j in range(n):
    a[j] = a[j] - (j + 1)
a.sort()
if n % 2 == 0:
    print(sum(a[int(n / 2):]) - sum(a[:int(n / 2)]))
else:
    print(sum(a[int((n + 1) / 2):]) - sum(a[:int((n - 1) / 2)]))
### BUGGY CODE ###

from collections import deque
import sys

H, W = map(int, sys.stdin.readline().strip().split())
grid = [list(sys.stdin.readline().strip()) for _ in range(H)]
dq = deque([(0, 0, 1)])
while dq:
    h, w, cnt = dq.popleft()
    grid[h][w] = cnt
    nexts = [(h+1, w, cnt+1), (h-1, w, cnt+1), (h, w+1, cnt+1), (h, w-1, cnt+1)]
    for y, x, c in nexts:
        if 0 <= y and y < H and 0 <= x and x < W and grid[y][x] == '.':
            dq.append((y, x, c))
            
sharp_num = 0
max_num = 0
for h in range(H):
    sharp_num += grid[h].count('#')
if grid[-1][-1] == '.' or grid[-1][-1] == '#':
    print(-1)
else:
    print(H * W - grid[-1][-1] - sharp_num)





### FIXED CODE ###

import sys
from collections import deque
 
h,w = map(int, sys.stdin.readline().split())
maze = [list(sys.stdin.readline()) for _ in range(h)]
dis = [[-1 for _ in range(w)] for _ in range(h)]
 
que = deque()
que.append((0,0))
dis[0][0] = 1
 
while que:
    y,x = que.popleft()
    for dx, dy in ((1,0), (0,1), (-1, 0), (0, -1)):
        nx = x + dx
        ny = y + dy
        if (nx < 0) or (nx > w-1) or (ny < 0) or (ny > h-1): continue
        if (maze[ny][nx] == '.') and (dis[ny][nx] == -1):
            dis[ny][nx] = dis[y][x] + 1
            que.append((ny, nx))
 
ans = 0
black_num = 0
for m in maze:
    black_num += m.count('#')
 
if dis[h-1][w-1] == -1:
    ans = -1
else:
    ans = w*h - black_num - dis[h-1][w-1]
 
print(ans)
### BUGGY CODE ###

a = int(input())
b = input()
b = b.split()
c = 1
for d in range(a):
  c = c * int(b[0])
  b.pop(0)
if c <= 1000000000000000000:
  print(c)
else:
  print(-1)

### FIXED CODE ###

a = int(input())
b = list(map(int, input().split()))
b.sort()
c = 1
e = 0
for d in range(a):
  c = c * b[0]
  b.pop(0)
  if c > 1000000000000000000:
    print(-1)
    e = 1
    break
if e == 0:
  print(c)
### BUGGY CODE ###

n=int(input())
ans=0
for i in range(n):
    k=i+1
    if k>8*10**8:
        break
    s=set(list(str(k)))
    if len(s)==3 and "3" in s and "5" in s and "7" in s:
        ans+=1
print(ans)


### FIXED CODE ###

#coding: utf-8
from collections import Counter
N = int(input())
l = ["0", "3", "5", "7"]
ans = ["0" for _ in range(9)]
cnt = 0
for a in l:
    ans[0] = a
    for b in l:
        ans[1] = b
        for c in l:
            ans[2] = c
            for d in l:
                ans[3] = d
                for e in l:
                    ans[4] = e
                    for f in l:
                        ans[5] = f
                        for g in l:
                            ans[6] = g
                            for h in l:
                                ans[7] = h
                                for i in l:
                                    ans[8] = i
                                    ans_i = int("".join(ans))
                                    ans_c = Counter(str(ans_i))
                                    if ans_i <= N and "0" not in str(ans_i) and len(ans_c.keys()) == 3 and len(str(ans_i)) >= 3:
                                        cnt += 1
print(cnt)
### BUGGY CODE ###

n,m = map(int,input().split())
o = [int(input()) for _ in range(m)]
#print(o)
mod = (10**9)+7
dp = [1]+[0]*(n)
flag1 = False

for i in range(n):
  if i+1 not in o:
    dp[i+1] = dp[i] + dp[i-1]
  else:
    dp[i+1] = 0
  #print(i,dp)
#print(dp)
print(dp[-1]%mod)


### FIXED CODE ###

n,m = map(int,input().split())
o = set(int(input()) for _ in range(m))
#print(o)
mod = (10**9)+7
dp = [0]*(n+1)
dp[0] = 1

for i in range(1,n+1):
  dp[i] = (dp[i-1]+dp[i-2])%mod
  if i in o:
    dp[i] = 0
  #print(i,dp)
#print(dp)
print(dp[-1])
### BUGGY CODE ###

N,K = map(int, input().split())
x = list(map(int, input().split()))
ans = 10**8 * 3

for i in range(N-K+1):
    light = x[i:i+K]
    l = light[0]
    r = light[-1]
    if l*r >= 0:
        time = max(abs(l), abs(r))
    else:
        time = min(abs(l)*2+abs(r), abs(l)+abs(r)*2)
    if time < ans:
        ans = time
print(ans)

### FIXED CODE ###

N,K = map(int, input().split())
x = list(map(int, input().split()))
ans=min([min(abs(x[i])+abs(x[i]-x[i+K-1]),abs(x[i+K-1])+abs(x[i+K-1]-x[i])) for i in range(N-K+1)])
print(ans)
### BUGGY CODE ###

n,m=(int(i) for i in input().split())
a=[]
max=0
for i in input().split():
  a.append((int(i)+1)/2)
for i in range(n-m+1):
  l=sum(a[i:i+m])
  if l>max:
    max=l
print(max)

### FIXED CODE ###

n,m=(int(i) for i in input().split())
l=[]
for i in input().split():
  l.append((int(i)+1)/2)
s=sum(l[0:m])
maxe=s
for i in range(n-m):
  s+=l[m+i]
  s-=l[i]
  if s>maxe:
    maxe=s
print(maxe)
### BUGGY CODE ###

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

ret = 0
for i in range(n):
    f = True
    for j in range(i):
        f = f and (p[i] <= p[j])
        if not f:
            break
    if f:
        ret +=1

print(ret)

### FIXED CODE ###

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

mn = p[0]
ret = 0
for i in range(n):
    if mn >= p[i]:
        ret += 1
    mn = min(mn, p[i])
print(ret)
### BUGGY CODE ###

from collections import deque
import sys
N=int(input())
numbers=[]
for _ in range(N-1):
    u,v,w=map(int,input().split())
    numbers.append([u-1,v-1,w])
inf=pow(10,9)
route=[[inf for _ in range(N)] for _ in range(N)]
for a in numbers:
    route[a[0]][a[1]]=a[2]
    route[a[1]][a[0]]=a[2]
visited_point=[inf for _ in range(N)]
visited_point[0]=0
stack=deque([0])
while len(stack)>0:
    n=stack.popleft()
    number=0
    for z in route[n]:
        if z==inf:
            number+=1
            continue
        if visited_point[number]==inf:
            visited_point[number]=visited_point[n]+z
            stack.append(number)
        number+=1
for a in visited_point:
    if a%2==0:
        print(0)
    else:
        print(1)


### FIXED CODE ###

from collections import deque
N=int(input())
numbers=[[] for _ in range(N)]
for _ in range(N-1):
    u,v,w=map(int,input().split())
    u-=1
    v-=1
    numbers[u].append((v,w%2))
    numbers[v].append((u,w%2))
inf=pow(10,9)
visited_point=[inf for _ in range(N)]
visited_point[0]=0
stack=deque([0])
while len(stack)>0:
    n=stack.pop()
    for v,w in numbers[n]:
        if visited_point[v]==inf:
            stack.appendleft(v)
            if w%2==0:
                visited_point[v]=visited_point[n]
            else:
                visited_point[v]=visited_point[n]^1
for a in visited_point:
    print(a)
### BUGGY CODE ###

k = int(input())

import math
from functools import reduce

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

sum_ = 0
for i in range(1, k+1):
    for j in range(1, k+1):
        for k in range(1, k+1):
            ttt = gcd(i, j, k)
            sum_ = sum_ + ttt

print(sum_)

### FIXED CODE ###

k = int(input())
from math import gcd
sum_ = 0
for i in range(1, k+1):
    for j in range(1, k+1):
        for k in range(1, k+1):
            sum_ += gcd(i, gcd(j, k))
print(sum_)
### BUGGY CODE ###

x,n = input().split()
x,n = int(x),int(n)

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

if x not in a:
  print(x)
else:
  sa = 1
  while True:
    if x-sa not in a:
      print(x-sa)
      break
    if x+sa not in a:
      print(x+sa)
      break

### FIXED CODE ###

x,n = input().split()
x,n = int(x),int(n)

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

if x not in a:
  print(x)
else:
  sa = 1
  while True:
    if x-sa not in a:
      print(x-sa)
      break
    if x+sa not in a:
      print(x+sa)
      break
    sa += 1
### BUGGY CODE ###

import sys
from math import log10


def _i(): return int(sys.stdin.readline().strip())


def _ia(): return map(int, sys.stdin.readline().strip().split())


def main():
    _ = _i()
    a = list(_ia())
    tmp = 0 if min(a) == 0 else sum(log10(ai) for ai in a)
    if tmp < 19:
        ret = 1
        for ai in a:
            ret *= ai
        if ret <= 10**18:
            return ret

    return -1


if __name__ == "__main__":
    print(main())


### FIXED CODE ###

import sys


def _i(): return int(sys.stdin.readline().strip())


def _ia(): return map(int, sys.stdin.readline().strip().split())


def main():
    _ = _i()
    m = 10**18
    ret = 1
    for ai in sorted(_ia()):
        ret *= ai
        if ret > m:
            return -1
    return ret


if __name__ == "__main__":
    print(main())
### BUGGY CODE ###

n = int(input())
s = input()
ans = 0
for i in range(n):
    for j in range(i+1, n):
        if s[i] == s[j]:
            continue
        for k in range(j+1, n):
            if j-i != k-j and s[i] != s[k] and s[j] != s[k]:
                ans += 1

print(ans)

### FIXED CODE ###

n = int(input())
s = input()
ans = s.count("R")*s.count("G")*s.count("B")
for i in range(n):
    for d in range(n):
        j = i + d
        k = j + d
        if k >= n:
            break
        if s[i] != s[j] and s[i] != s[k] and s[j] != s[k]:
            ans -= 1

print(ans)
### BUGGY CODE ###

x=int(input())
count=0

n=1
while True:
	n+=1
	ans=True
	for i in range(2,int(x**0.5)):
		if n%i==0:
			ans=False
	if ans and n>=x:
		print(n)
		break


### FIXED CODE ###

x=int(input())
count=0

n=1
while True:
	n+=1
	ans=True
	for i in range(2,int(x**0.5)):
		if n%i==0:
			ans=False
			break
	if ans and n>=x:
		print(n)
		break
### BUGGY CODE ###

def numdiv(n):
    num=0
    for i in range(1,int(n**0.5)+1):
        if n%i==0:
            num+=1
            if n//i != i:
                num+=1
    return num
n = int(input())
ans = 0
for i in range(1,n):
    ans += numdiv(i)
print(ans)

### FIXED CODE ###

n = int(input())
ans = 0
for i in range(1,n):
    ans += (n-1)//i
print(ans)
### BUGGY CODE ###

n=int(input())
A=list(map(int, input().split()))
A=sorted(A)

from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

now=0
l=0
r=0
for i in range(n-1):
    for j in range(i+1,n):
        c=cmb(A[j],A[i])
        if now<c:
            now=c
            l=A[i]
            r=A[j]
print(r,l)



### FIXED CODE ###


n=int(input())
A=sorted(list(map(int, input().split())))
amax=max(A)
half=amax/2

ans=0
now=amax
for a in A:
  if abs(a-half)<=now and a<amax:
    now=abs(a-half)
    ans=a
print(amax, ans)
### BUGGY CODE ###

r,g,b,n = map(int,input().split())

ans = 0
for i in range(n//r+1):
    for j in range(n//g+1):
        if 0 <= n-r*i-g*j:
            if (n-r*i-g*j)%b == 0:
                ans += 1

print(ans)

### FIXED CODE ###

r,g,b,n = map(int,input().split())

ans = 0
for i in range(n//r +1):
    for j in range(n//g +1):
        if 0 <= n-r*i-g*j and (n-r*i-g*j)%b == 0:
            ans += 1

print(ans)
### BUGGY CODE ###

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

searched = []
if N < M:
    print('NO')
else:
    flag = True
    for i in range(M):
        if T[i] not in searched:
            if D.count(T[i]) < T.count(T[i]):
                flag = False
                break
        searched.append(T[i])
    if flag:
        print('YES')
    else:
        print('NO')

### FIXED CODE ###

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


def countNumber(LIST):
    cnt = {}
    for l in LIST:
        try:
            cnt[l] += 1
        except KeyError:
            cnt[l] = 1
    return cnt


countD = countNumber(D)
countT = countNumber(T)

flag = True
for i in countT.keys():
    try:
        if countD[i] < countT[i]:
            flag = False
    except KeyError:
        flag = False
        break

if flag:
    print('YES')
else:
    print('NO')
### BUGGY CODE ###

n, m = map(int, input().split( ))
a = list(map(int, input().split( )))
mod = {0:1}###
a_sum = 0
for i in range(n):
    a_sum += a[i]
    a_sum %= m
    if a_sum in mod.keys():

        mod[a_sum] += 1
    else:

        mod[a_sum] = 1

ans = 0
for key in mod.keys():
    k = mod[key]

    ans += k*(k-1)//2

print(ans)

### FIXED CODE ###

from collections import defaultdict
n, m = map(int, input().split( ))
a = list(map(int, input().split( )))
mod = defaultdict(int)###defaultdict使用
a_sum = 0
for i in range(n):
    a_sum += a[i]
    a_sum %= m
    mod[a_sum] += 1
 
ans = mod[0]
for v in mod.values():
    ans += v*(v-1)//2

print(ans)
### BUGGY CODE ###

N = int(input())

V = []
for i in range(N):
    V.append(input())

P = []
for i in range(N):
    P.append(V.count(V[i]))

A = []
for i in range(N):
    if max(P) == P[i]:
        A.append(V[i])

A = list(set(A))
A.sort()

for i in A:
    print(i)

### FIXED CODE ###

import collections as clcts

N = int(input())

V = []
for i in range(N):
    V.append(input())

P = clcts.Counter(V)

W = max(P.values())
A = [i for i, j in P.items() if j == W]
A.sort()

for i in A:
    print(i)
### BUGGY CODE ###

def main():
  if 'get_ipython' not in globals():  
    # For Subsession
    N = int(input())
    # b = list(map(int, input().split()))
    b = [int(i) for i in input().split()] 
  else:
    b = [1,2,1]
    # b = [2,2]
    # b = [1,1,1,2,2,1,2,3,2]
    N = len(b)
  
  if check(b,N) != True:
    print(-1)
    
def check(B,lenB):
  # if 'get_ipython' in globals(): print(B)
  if lenB == 0 :
    return True
  #for i in reversed(range(lenB)):
  for i in range(lenB-1,-1,-1):
    if B[i] == i+1:
      if check(B[:i]+B[(i+1):],lenB -1 ) == True:
        print(B[i])
        return True
        break
    
main()

### FIXED CODE ###

import sys

def main():
  if 'get_ipython' not in globals():  
    # For Subsession
    N = int(input())
    b = [int(i) for i in input().split()] 
  else:
    # b = [1,2,1]
    # b = [2,2]
    b = [1,1,1,2,2,1,2,3,2]
    N = len(b)

  ans = []
  while True:
    for i in range(N-1,-1,-1):
      if b[i] == i+1:
        ans.append(i+1)
        del b[i]
        N = N -1
        break
      if i == 0:
        print(-1)
        sys.exit()
    if N == 0:
      break

  for i in reversed(ans):
    print(i)
    
main()
### BUGGY CODE ###

import sys
sys.setrecursionlimit(10 ** 6)  # 再帰関数の再帰の深さを設定
to_index = lambda x: int(x) - 1  # 入力した数字に1を引いたものを返す
print_list_in_2D = lambda x: print(*x, sep="\n")  # リストの要素を改行を挟んで表示する関数

# 入力を整数に変換して受け取る
def input_int():
    return int(input())

def map_int_input():
    return map(int, input())

MII = map_int_input

def MII_split():
    return map(int, input().split())

def MII_to_index():
    return map(to_index, input())

def MII_split_to_index():
    return map(to_index, input().split())

# 入力全てを整数に変換したものの配列を受け取る
def list_int_inputs():
    return list(map(int, input()))

LII = list_int_inputs

def LII_split():
    return list(map(int, input().split()))

# 2次元リスト化
def LII_2D(rows_number):
    return [LII() for _ in range(rows_number)]

def LII_split_2D(rows_number):
    return [LII_split() for _ in range(rows_number)]

N = input_int()
a_list = LII_split()

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default

ans = 0
pre_idx = -1  # 前の数字のindex

for i in range(1, N + 2):
    i_idx = -1
    for idx, x in enumerate(a_list):
        if x == i and idx > pre_idx:
            i_idx = idx
    # print(f'{i_idx=}')
    # return
    if i_idx >= 0:
        ans += i_idx - pre_idx - 1  # 砕く数
        # if i == 1:
        #     ans -= 1
        pre_idx = i_idx
    elif i == 1:
        ans = -1
        break
    else:
        ans += N - pre_idx - 1
        break
print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 6)  # 再帰関数の再帰の深さを設定
to_index = lambda x: int(x) - 1  # 入力した数字に1を引いたものを返す
print_list_in_2D = lambda x: print(*x, sep="\n")  # リストの要素を改行を挟んで表示する関数

# 入力を整数に変換して受け取る
def input_int():
    return int(input())

def map_int_input():
    return map(int, input())

MII = map_int_input

def MII_split():
    return map(int, input().split())

def MII_to_index():
    return map(to_index, input())

def MII_split_to_index():
    return map(to_index, input().split())

# 入力全てを整数に変換したものの配列を受け取る
def list_int_inputs():
    return list(map(int, input()))

LII = list_int_inputs

def LII_split():
    return list(map(int, input().split()))

# 2次元リスト化
def LII_2D(rows_number):
    return [LII() for _ in range(rows_number)]

def LII_split_2D(rows_number):
    return [LII_split() for _ in range(rows_number)]

N = input_int()
a_list = LII_split()

ans = 0
# pre_idx = 0  # 前の数字のindex
current_idx = 0
continuous_cnt = 0

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

    while current_idx < N:
        if a_list[current_idx] == i:
            continuous_cnt += 1
            break
        else:
            current_idx += 1
    if i == 1 and continuous_cnt == 0:
        break

print(N - continuous_cnt if continuous_cnt > 0 else -1)
### BUGGY CODE ###

def main():

    s = input()
    t = input()
    m, n = len(s), len(t)
    dp = [["" for _ in range(n+1)] for _ in range(m+1)]

    for i in range(m):
        for j in range(n):
            if s[i] == t[j]:
                dp[i+1][j+1] = dp[i][j] + s[i]
            else:
                cand = [dp[i][j], dp[i+1][j], dp[i][j+1]]
                max_l = 0
                max_cand = ""
                for c in cand:
                    if len(c) > max_l:
                        max_l = len(c)
                        max_cand = c
                dp[i+1][j+1] = max_cand
    return dp[m][n]


if __name__ == '__main__':
    print(main())

### FIXED CODE ###

def main():

    s = input()
    t = input()
    m, n = len(s), len(t)
    dp = [[0 for _ in range(n+1)] for _ in range(m+1)]

    for i in range(m):
        for j in range(n):
            if s[i] == t[j]:
                dp[i+1][j+1] = dp[i][j] + 1
            else:
                dp[i+1][j+1] = max(dp[i][j+1], dp[i+1][j])

    i, j = m, n
    ans = ""
    while i > 0 and j > 0:
        if s[i-1] == t[j-1]:
            ans += s[i-1]
            i -= 1
            j -= 1
        elif dp[i][j-1] > dp[i-1][j]:
            j -= 1
        else:
            i -= 1
    return ans[::-1]


if __name__ == '__main__':
    print(main())
### BUGGY CODE ###

import functools

def solve():
    n = read()
    result = think(n)
    write(result)


def read():
    return read_int(1)[0]


def read_int(n):
    return list(map(lambda x: int(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(n):
    p = 10 ** 9 + 7
    return mod_fact(n, p)


def mod_fact(n, p):
    sequence = [i + 1 for i in range(n)]
    return functools.reduce(lambda x, y: x * y, sequence) % p


def write(result):
   print(result)


if __name__ == '__main__':
    solve()

### FIXED CODE ###

def solve():
    n = read()
    result = think(n)
    write(result)


def read():
    return read_int(1)[0]


def read_int(n):
    return list(map(lambda x: int(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(n):
    p = 10 ** 9 + 7
    return mod_fact(n, p)

def mod_fact(n, p):
    if n == 1:
        return 1 % p

    result = 1 % p
    for i in range(n):
        r_1 = result % p
        r_2 = (i + 1) % p
        result = (r_1 * r_2) % p
    return result

def write(result):
   print(result)


if __name__ == '__main__':
    solve()
### BUGGY CODE ###

N, K, Q = map(int, input().split())
A = []
for i in range(Q):
  A.append(int(input()))

B = []
for j in range(1, N+1):
  sj = 0
  for k in range(Q):
    if j != A[k]:
      sj += 1
    if sj >= K:
      break
  if sj < K:
    B.append('Yes')
  else:
    B.append('No')

for l in range(len(B)):
  print(B[l])

### FIXED CODE ###

N, K, Q = map(int, input().split())
A = []
for i in range(Q):
  A.append(int(input()))
B = [0 for b in range(N)]

for j in range(len(A)):
  B[A[j]-1] += 1
  
for l in range(len(B)):
  if B[l] > Q - K:
    print('Yes')
  else:
    print('No')