Harryxun/stf_run huggingface dataset:
s=input()
t=input()

li=[]
for i in range(len(s)-len(t)+1):
    if s[i]==t[0] or s[i]=='?':
        check=1
        tid=1
        while True:
            if s[i+1] ==t[tid] or s[i+1]=='?':

                check+=1
                i+=1
                tid+=1
                print(check)
                if check==len(t):
                    li.append(s[:i-len(t)]+t+s[i+len(t):])
                    break
            else:
                break

li2=[]                
for i in li:

    li2.append(i.replace('?','a'))
li2.sort    

print(li2[0] if li2 else 'UNRESTORABLE')

### FIXED CODE ###

s=input()
t=input()

li=[]
for i in range(len(s)-len(t)+1):
    if s[i]==t[0] or s[i]=='?':
        check=1
        tid=1
        if len(t)==1:
            li.append(s[:i-len(t)+1]+t+s[i+1:])
        else:

            while True:
                if s[i+1] ==t[tid] or s[i+1]=='?':

                    check+=1
                    i+=1
                    tid+=1

                    if check==len(t):
                        li.append(s[:i-len(t)+1]+t+s[i+1:])
                        break
                else:
                    break

li2=[]      

for i in li:

    li2.append(i.replace('?','a'))
    

li2.sort()


print(li2[0] if li2 else 'UNRESTORABLE')
A,B=int(input().split())
print("Yes" if (A*B)%1==0 else "No")

### FIXED CODE ###

A,B=map(int,input().split())
print("Yes" if (A*B)%2==1 else "No")
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 998244353

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    rr = []

    while True:
        m,n = LI()
        if n == 0 and m == 0:
            break

        l = 7368792
        a = [None] * l
        j = m
        for i in range(n):
            while not a[j] is None:
                j += 1
            for k in range(j,l,j):
                a[k] = 1
        while not a[j] is None:
            j += 1

        rr.append(j)

    return '\n'.join(map(str, rr))


print(main())




### FIXED CODE ###

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


class Prime():
    def __init__(self, m):
        self.M = m + 1
        self.A = a = [True] * self.M
        a[0] = a[1] = 0
        self.T = t = []
        sq = int(math.sqrt(self.M))
        q = 0
        for i in range(2, sq + 1):
            if not a[i]:
                a[i] = q
                continue
            t.append(i)
            a[i] = q
            q += 1
            for j in range(i*i,m,i):
                a[j] = False

        for i in range(sq + 1, self.M):
            if a[i]:
                a[i] = q
                q += 1
                t.append(i)
            else:
                a[i] = q

    def is_prime(self, n):
        return self.A[n]


def main():
    rr = []

    M = 7368792
    pr = Prime(M)

    def f(m, n):
        nn = n
        g = [None] * (m*m)
        for i in range(m, m*m):
            if not g[i]:
                if n == 0:
                    return i
                n -= 1
                for j in range(i, m*m, i):
                    g[j] = 1
        d = pr.A[m*m]
        return pr.T[d+n]

    while True:
        m,n = LI()
        if m == 0 and n == 0:
            break
        rr.append(f(m,n))

    return '\n'.join(map(str,rr))




print(main())
a,b,c = map(int, input().split())
l = [int(input()) for _ in range(a)]
flag = True
l = sorted(l)
max_T = 10**18
def ok(k):
    s = k
    for i in l:
        hp = i - c * k
        if hp > 0:
            s -= -(-hp // (b - c))
        if s < 0:
            return False
    return True
def binary_search(l,r):
    mid = (l + r) // 2
    if l == r:
        return l
    elif ok(mid):
        return bbb(l,mid)
    else:
        if mid == l:
            mid += 1
            
        return bbb(mid,r)
ans =binary_search(0,max_T)
print(ans) 

### FIXED CODE ###

a,b,c = map(int, input().split())
l = [int(input()) for _ in range(a)]
flag = True
l = sorted(l)
max_T = 10**18
def ok(k):
    s = k
    for i in l:
        hp = i - c * k
        if hp > 0:
            s -= -(-hp // (b - c))
        if s < 0:
            return False
    return True
def binary_search(l,r):
    mid = (l + r) // 2
    if l == r:
        return l
    elif ok(mid):
        return binary_search(l,mid)
    else:
        if mid == l:
            mid += 1
            
        return binary_search(mid,r)
ans = binary_search(0,max_T)
print(ans)
a = string(input())
n = 0
if a[0] == 1:
  n = n+1
if a[1] == 1:
  n = n+1
if a[2] == 1:
  n = n+1
  
print(n)

### FIXED CODE ###

a = input()
n = 0
if a[0] == '1':
  n = n+1
if a[1] == '1':
  n = n+1
if a[2] == '1':
  n = n+1
  
print(n)
N = int(input())
print(N*(N+1)//2

### FIXED CODE ###

N = int(input())
print(N*(N+1)//2)
n = int(input())
li = [0] * n
for i in range(n):
    a, b = [int(x) for x in input().split()]
    li.append([a,b])
count = 0
for i in li:
    if i[0] == i[1]:
        count += 1
    else:
        count = 0

if count == 0: print('Yes')
else: print('No')

### FIXED CODE ###

n = int(input())
li = list()
for i in range(n):
    a, b = [int(x) for x in input().split()]
    li.append([a,b])

count = 0
for i in li:
    if count < 3:
        if i[0] == i[1]:
            count += 1
        else:
            count = 0
    else:
        break

if count >= 3: print('Yes')
else: print('No')
# -*- coding: utf-8 -*-


def is_acgt(s):
    if s=='A' or s=='C' or s=='G' or s=='T':
        return 1
    else: return 0


x = raw_input()


count = []
c = 0
for s in x:
    a = is_acgt(s)
    if a == 0:
        count.append(c)
        c = 0
    else:
        c += 1


print max(count)


### FIXED CODE ###

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


def is_acgt(s):
    if s=='A' or s=='C' or s=='G' or s=='T':
        return 1
    else: return 0


x = raw_input()


count = []
c = 0
for s in x:
    a = is_acgt(s)
    if a == 0:
        count.append(c)
        c = 0
        continue
    else:
        c += 1

    count.append(c)

if len(count)==0:
    print 0
    exit()
print max(count)
def get_cost(arr, n):
  global dp_arr

  if n == 1:
    return abs(arr[1] - arr[0])
  elif n == 0:
    return 0
  else:
    if dp_arr[n] is not 0:
      return dp_arr[n]
    else:
      dp_arr[n] = min(
        abs(arr[n] - arr[n-1]) + get_cost(arr, n-1),
        abs(arr[n] - arr[n-2]) + get_cost(arr, n-2)
      )
      return dp_arr[n]


N = int(input())
arr = [int(num) for num in input().split()]
dp_arr = [0]*(N+1)
print(get_cost(arr, N-1))


### FIXED CODE ###

import sys
sys.setrecursionlimit(500000)

def get_cost(arr, n, dp):
  if dp[n] != float('inf'):
    return dp[n]
  if n == 1:
    dp[1] = abs(arr[1] - arr[0])
    return dp[1]
  elif n == 0:
    dp[0] = 0
    return dp[0]
  else:
    dp[n] = min(
      abs(arr[n] - arr[n-1]) + get_cost(arr, n-1, dp),
      abs(arr[n] - arr[n-2]) + get_cost(arr, n-2, dp)
    )
    return dp[n]


N = int(input())
arr = [int(num) for num in input().split()]
dp_arr = [float('inf')]*N
print(get_cost(arr, N-1, dp_arr))
def get_count(li,c):
    m=(li[0][c],1)
    h={}
    h[li[0][c]]=1
    for i in li[1:]:
        if(i[c] in h):
            h[i[c]]+=1
        else:
            h[i[c]]=1
        if(m[1]<h[i[c]]):
            m=(i[c],h[i[c]])
    return m


h,w,n=list(map(int,input().split()))
if(h==1 or w==1 or n<=1):
    li = []
    for i in range(n):
        li.append(tuple(map(int, input().split())))
    print(n)
else:
    li=[]
    for i in range(n):
        li.append(tuple(map(int,input().split())))
    li=list(set(li))

    r=get_count(li,0)
    c=get_count(li,1)
    # print(r,c)
    s=0
    if(r[1]>c[1]):
        temp=[]
        for i in li:
            if(i[0]!=r[0]):
                temp.append(i)
        s+=r[1]+get_count(temp,1)[1]
    else:
        temp=[]
        for i in li:
            if(i[1]!=c[0]):
                temp.append(i)
        s+=c[1]+get_count(temp,0)[1]

    print(s)



### FIXED CODE ###


def get_count(li,c):
    if(li==[]):
        return ((0,0))
    m=(li[0][c],1)
    h={}
    h[li[0][c]]=1
    for i in li[1:]:
        if(i[c] in h):
            h[i[c]]+=1
        else:
            h[i[c]]=1
        if(m[1]<h[i[c]]):
            m=(i[c],h[i[c]])
    return m


h,w,n=list(map(int,input().split()))

if(h==1 or w==1 or n<=1):
    li = []
    for i in range(n):
        li.append(tuple(map(int, input().split())))
    print(n)
else:
    li=[]
    for i in range(n):
        li.append(tuple(map(int,input().split())))
    li=list(set(li))
    r=get_count(li,0)
    c=get_count(li,1)
    # print(r,c)
    s=0
    if(r[1]>c[1]):
        temp=[]
        for i in li:
            if(i[0]!=r[0]):
                temp.append(i)
        s+=r[1]+get_count(temp,1)[1]
    else:
        temp=[]
        for i in li:
            if(i[1]!=c[0]):
                temp.append(i)
        s+=c[1]+get_count(temp,0)[1]

    print(s)
x, n = map(int, input().split())
P = list(map(int, input(), split()))

P.sort()
P.append(101)

excluded = P.pop(0)

ans, absolute = None, 101

for i in range(1, 101):
    if i == excluded:
        excluded = P.pop(0)
    else:
        if abs(i - x) < absolute:
            ans = i
            absolute = abs(i - x)
    
print(ans)

### FIXED CODE ###

x, n = map(int, input().split())
P = list(map(int, input().split()))

for d in range(x + 1):
    for s in [-1, +1]:
        a = x + s * d
        if P.count(a) == 0:
            print(a)
            exit(0)
x = input().split()
y = input().split()

cnt = 0

for i in y:
  if i >= int(x[1]):
    cnt += 1
    
print(cnt)

### FIXED CODE ###

x = input().split()
y = input().split()

cnt = 0

for i in y:
  if int(i) >= int(x[1]):
    cnt += 1
    
print(cnt)
n = int(input())
l = 0
r = 0
cntl = 0
cntr = 0
fl = 0
fr = 0
exl = 0
exr = 0
only_r = 0
only_l = 0
maxl = 0
maxr = 0
exlr = []
for i in range(n):
    s = input()
    templ = 0
    tempr = 0
    temp_exl = 0
    temp_exr = 0
    fl = 0
    fr = 0
    for i in s:
        if i == "(":
            tempr += 1
        elif i == ")":
            tempr -= 1
            if tempr < 0:
                tempr = 0
                templ += 1
                fl = 1
    temp_exl += templ
    if tempr > 0:
        temp_exr += tempr
        fr = 1
    if fl == 1 and fr == 0:
        only_l += temp_exl
    elif fr == 1 and fl == 0:
        only_r += temp_exr
    elif temp_exl + temp_exr > 0:
        exl += temp_exl
        exr += temp_exr
        exlr.append([temp_exl-temp_exr, temp_exl,temp_exr])
    # maxl = max(maxl,temp_exl)
    # maxr = max(maxr,temp_exr)
# print (exr,exl,only_r,only_l)
a = only_r
b = 0
exlr.sort()
exlr = sorted(exlr, key=lambda x: x[1])

# print(exlr)
for i in range(len(exlr)):
    if exlr[i][1] <= a:
        a -= i[0]
        exlr[i] = [0,0,0]
for i in exlr:
    a -= i[1]
    if a<0:
        print("No")
        exit()
    a += i[2]
if exl+only_l == exr+only_r and exl-exr == only_r-only_l and only_l > 0 and only_r > 0:
    print("Yes")
elif exr+exl+only_l+only_r == 0:
    print("Yes")
else:
    print("No")

    





### FIXED CODE ###

n = int(input())
l = 0
r = 0
cntl = 0
cntr = 0
fl = 0
fr = 0
exl = 0
exr = 0
only_r = 0
only_l = 0
maxl = 0
maxr = 0
exlr = []
for i in range(n):
    s = input()
    templ = 0
    tempr = 0
    temp_exl = 0
    temp_exr = 0
    fl = 0
    fr = 0
    for i in s:
        if i == "(":
            tempr += 1
        elif i == ")":
            tempr -= 1
            if tempr < 0:
                tempr = 0
                templ += 1
                fl = 1
    temp_exl += templ
    if tempr > 0:
        temp_exr += tempr
        fr = 1
    if fl == 1 and fr == 0:
        only_l += temp_exl
    elif fr == 1 and fl == 0:
        only_r += temp_exr
    elif temp_exl + temp_exr > 0:
        exl += temp_exl
        exr += temp_exr
        exlr.append([temp_exl-temp_exr, temp_exl,temp_exr])
    # maxl = max(maxl,temp_exl)
    # maxr = max(maxr,temp_exr)
# print (exr,exl,only_r,only_l)
a = only_r
b = only_l
exlr.sort()
# exlr.sort(key=lambda x: x[1])

# print(exlr)
for i in range(len(exlr)):
    if exlr[i][1] <= a and exlr[i][0] <= 0:
        a -= exlr[i][0]
        exlr[i] = [0,0,0]
# print(exlr)
for i in exlr:
    a -= i[1]
    if a<0:
        print("No")
        exit()
    a += i[2]
if a-b == 0:
    print("Yes")
else:
    print("No")
# if exl+only_l == exr+only_r and exl-exr == only_r-only_l and only_l > 0 and only_r > 0:
#     print("Yes")
# elif exr+exl+only_l+only_r == 0:
#     print("Yes")
# else:
#     print("No")
def check(al,bl,cnt,i,j):


    if(i==-1 or j==-1):
        return cnt

    elif(j >i):
        c = check(al,bl,cnt,i,j-1)
        
    elif(al[i] > bl[j]) :
        al[i] = al[i]-bl[j]
        cnt += bl[j]
        c = check(al,bl,cnt,i,j-1)
    elif(al[i] < bl[j]):
        bl[j] = bl[j] - al[i]
        cnt += al[i]
        c= check(al,bl,cnt,i-1,j)
    elif(al[i] == bl[j]):
        cnt += al[i]
        c = check(al,bl,cnt,i-1,j-1)

    return c

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

cnt = 0

print(check(a,b,cnt,len(a)-1,len(b)-1))

### FIXED CODE ###

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

cnt = 0
res = 0 #余力
for i in range(n):

    ch = min(a[i],res)
    cnt += ch
    a[i] -= ch
    if b[i] > a[i]:
        cnt += a[i]
        res = b[i] - a[i]
    else:
        cnt += b[i]
        res = 0

cnt += min(a[n],res)

print(cnt)
s = input()
print('Yes' if len(set(s)==2 else 'No')

### FIXED CODE ###

s = input()
print('Yes' if len(set(s))==2 else 'No')
N = int(input())
A = []
for i in range(int(N**0.5)):
  if N%(i+1) == 0:
    A.append(i)
print(len(str(int(N/A[-1]))))


### FIXED CODE ###

def p(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
def P(L):
  P = 1
  for c in range(len(L)):
    P = P*L[c]
  return P  
N = int(input())
A = p(N)
F = []
for i in range(2**(len(A))):
  B = []
  C = []
  for j in range(len(A)):
    if(i>>j&1):
      B.append(A[j])
    else:
      C.append(A[j])
  F.append(max(len(str(P(B))),len(str(P(C)))))
  
print(min(F))
x, y = map(int, input().split())
if x < y:
    print('<')
elif x > y:
    print('>')
else:
    print('=')


### FIXED CODE ###

x, y = map(ord, input().split())
if x < y:
    print('<')
elif x > y:
    print('>')
else:
    print('=')
from pprint import pprint
'''
## O(1)のパターン
N , Z , W = map(int , input().split())

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

print(max(abs(a[N - 2] - a[N - 1]), abs(a[N - 1] - W)))
'''
## DPを使って解くとき
N , Z , W = map(int , input().split())
a = list(map(int , input().split()))
a.reverse()
a += [W]
#print(a)
memo = [[-1]* (N + 1) , [-1] * (N + 1)]
def DP(n , turn):

    if n == 1:
        #print(memo[turn][n])
        return abs(a[0] - W)
    if memo[turn][n] != -1:
        return memo[turn][n]
    if turn == 1:
        #print("turn : 1")
        tmp_max = 0
        for i in range(1 , n + 1):
            if i == n:
                tmp_max = max(tmp_max , abs(a[0]-W))
            else:
                tmp_max = max(tmp_max , DP(n - 1,1 - turn))
        #print("tmp_max : ",tmp_max)
        memo[turn][n] = tmp_max
        return tmp_max
    if turn == 0:
        tmp_min = 10 ** 9
        #print("turn : 0")
        for i in range(1 , n + 1):
            if i == n:
                tmp_min = min(tmp_min , abs(a[0]-W))
            else:
                tmp_min = min(tmp_min , DP(n - 1,1 - turn))
        #print("tmp_min : ",tmp_min)
        memo[turn][n] = tmp_min
        return tmp_min



print(DP(N , 1))
#print(memo)


### FIXED CODE ###

N , Z , W = map(int , input().split())

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

print(max(abs(a[N - 2] - a[N - 1]), abs(a[N - 1] - W)))
from math import floor

def main():
    n = int(input())

    for i in range(110):
        dp.append(10000000)
    dp[0] = 0

    seven = floor(n/7)
    for i in range(seven+1):
        mod = n - i*7
        if mod % 4 == 0:
            print('Yes')
            return
    print('No')


main()


### FIXED CODE ###

from math import floor

def main():
    n = int(input())

    seven = floor(n/7)
    for i in range(seven+1):
        mod = n - i*7
        if mod % 4 == 0:
            print('Yes')
            return
    print('No')


main()
import sys
sys.setrecursionlimit(10**5 + 9)
from collections import defaultdict
dp=defaultdict(lambda:0)
n=int(input())
ar,br,cr=[0]*n,[0]*n,[0]*n
for i in range(n):
	ar[i],br[i],cr[i]=map(int,input().split())
def points(i,pv):
	if dp[(i,pv)] != 0:
		return dp[(i,pv)]
	if pv==1:
		x,y=br[i],cr[i]
		a,b=2,3
	elif pv==2:
		x,y=ar[i],cr[i]
		a,b=1,3
	else:
		x,y=ar[i],br[i]
		a,b=1,2
	if i==n-1:
		return max(x,y)
	ax=points(i+1,a)+x
	by=points(i+1,b)+y
	ans=max(by,ax)
	dp[(i,pv)]=ans
	return ans
p=points(1,1)+ar[0]
q=points(1,2)+br[0]
r=points(1,3)+cr[0]
print(max(p,q,r))

	
		



### FIXED CODE ###

import sys
sys.setrecursionlimit(10**5 + 9)
from collections import defaultdict
dp=defaultdict(lambda:0)
n=int(input())
ar,br,cr=[0]*n,[0]*n,[0]*n

for i in range(n):
	ar[i],br[i],cr[i]=map(int,input().split())
if n==1:
	print(max(ar[0],br[0],cr[0]))
	exit()
def points(i,pv):
	if dp[(i,pv)] != 0:
		return dp[(i,pv)]
	if pv==1:
		x,y=br[i],cr[i]
		a,b=2,3
	elif pv==2:
		x,y=ar[i],cr[i]
		a,b=1,3
	else:
		x,y=ar[i],br[i]
		a,b=1,2
	if i==n-1:
		return max(x,y)
	ax=points(i+1,a)+x
	by=points(i+1,b)+y
	ans=max(by,ax)
	dp[(i,pv)]=ans
	return ans
p=points(1,1)+ar[0]
q=points(1,2)+br[0]
r=points(1,3)+cr[0]
print(max(p,q,r))
numberOfToorists = int(input())

minimumCapacity = 10.0**16

for i in range(5):
	vehicleCapacity = int(input())
	minimumCapacity = min(minimumCapacity, vehicleCapacity)

bottleNeckTime = numberOfToorists / minimumCapacity
if numberOfToorists % minimumCapacity > 0:
	bottleNeckTime += 1

requiredTime = bottleNeckTime + 4

print(requiredTime)

### FIXED CODE ###

import numpy as np

nums = []
sortedNums = [0,0,0,0,0]
sortedRemainders = [0,0,0,0,0]
for i in range(5):
	nums.append(int(input()))

remainders = [0,0,0,0,0]
for i in range(5):
	if nums[i] % 10 == 0:
		remainders[i] = 10
	else:
		remainders[i] = nums[i] % 10

sortedRemaindersIndex = np.ndarray.tolist(np.argsort(remainders))

for i in range(5):
	sortedNums[i] = nums[sortedRemaindersIndex[i]]

elapsedTime = 0
for i in range(4):
	if sortedNums[i+1] % 10 == 0:
		elapsedTime += sortedNums[i+1]
	else:
		elapsedTime += sortedNums[i+1] + 10 - sortedNums[i+1] % 10

elapsedTime += sortedNums[0]

print(elapsedTime)
i = input()
a,b = map(int, i.split())
c = 1

while a > b:
    a -= b
    c += 1
    else:
      print(c)

### FIXED CODE ###

i = input()
a,b = map(int, i.split())
cnt = 1

while(a>b) :
    a -= b
    cnt +=1


print(cnt)
while True:
 a,b = map(int,input().split())

 if a < b:
   print('a < b')
 elif a == b:
   print('a == b')
 elif:
   print('a > b')

### FIXED CODE ###

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

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

print(["error", A + B] A + B < 10)


### FIXED CODE ###

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

print(["error", A + B] [A + B < 10])
N = int(input())
A = list(map(int, input().split()))
A_dict = {}
ans = 0

for i in range(len(A)):
    if (i+1) <=2 * 10**4:
        A_dict[i+1] = A[i]

for k_1, v_1 in A_dict.items():
    for k_2, v_2 in A_dict.items():
        if abs(k_2 - k_1) == v_1 + v_2:
            ans += 1

print(ans // 2)

### FIXED CODE ###

import sys

X = int(input())
i = 0

while 1:
    i += 1
    for j in range(-i+1, i):
        if i**5 - j**5 == X:
            print(i, j)
            sys.exit()
n = int(input()))
M = [[0] * n for i in range(n)]
for i in range(n):
    u = list(map(int, input().split()))
    v = u[0]
    for j in u[2:]:
        M[u - 1][v - 1] = 1

for i in M:
    print(*i)

### FIXED CODE ###

n = int(input())
M = [[0] * n for i in range (n)]
for i in range(n):
    u = list(map(int, input().split()))
    v = u[0]
    for j in u[2:]:
        M[v - 1][j - 1] = 1

for i in M:
    print(*i)
N = int(input())
M = int(input())
if M ==N:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

N,M = map(int,input().split())
if M ==N:
    print("Yes")
else:
    print("No")
import math
import os
import random
import re
import sys
from collections import defaultdict

sys.stdin = open('input.in', 'r')
sys.stdout = open('output.out', 'w') 

def count(n, h):
	count = 0
	if len(h) < 1:
		return count
	max = h[0]
	for i in h:
		if i >= max:
			max = i 
			count += 1

	return count

if __name__ == '__main__':
	n = int(input())
	h = list(map(int, input().rstrip().split()))
	print(count(n, h))

### FIXED CODE ###

import math
import os
import random
import re
import sys
from collections import defaultdict

# sys.stdin = open('input.in', 'r')
# sys.stdout = open('output.out', 'w') 

def count(n, h):
	count = 0
	if len(h) < 1:
		return count
	max = h[0]
	for i in h:
		if i >= max:
			max = i 
			count += 1

	return count

if __name__ == '__main__':
	n = int(input())
	h = list(map(int, input().rstrip().split()))
	print(count(n, h))
N,R = map(int,input().split())
 
if N >= 10:
  print(R)
else:
  print(R + 100*(10-K))

### FIXED CODE ###

N,R = map(int,input().split())
 
if N >= 10:
  print(R)
else:
  print(R + 100*(10-N))
num = int(input())
weight_list = [int(i) for i in input().split(" ")]
ans_condinate = []
for i in range(num):
    ans_condinate.append(abs(sum(weight_list[:i + 1]) - sum(weight_list[i + 1:])))
print(min(ans_condinate))
a

### FIXED CODE ###

num = int(input())
weight_list = [int(i) for i in input().split(" ")]
ans_condinate = []
for i in range(num):
    ans_condinate.append(abs(sum(weight_list[:i + 1]) - sum(weight_list[i + 1:])))
print(min(ans_condinate))
N = int(input())
S = input()
A = [chr(ord('A') + i) for i in range(26)]
for i in range(len(S)):
    res = A.index(S[i]) + N
    if res > 25:
        res -= 25
    print(A[res], end = '')

### FIXED CODE ###

N = int(input())
S = input()
A = [chr(ord('A') + i) for i in range(26)]
for i in range(len(S)):
    res = A.index(S[i]) + N
    if res >= 26:
        res -= 26
    print(A[res], end = '')