Harryxun/stf_run huggingface dataset:
line = input().split()
N, M = int(line[0]), int(line[1]) 

if M == 0:
  return 10**N

conds = []
for i in range(M):
  line = input().split()
  conds.append((int(line[0]),int(line[1])))
 
NUM = [-1] * N
 
isOK = True
for curCon in conds:
  s = curCon[0]
  dig = curCon[1]
  
  if NUM[s-1] == -1:
    NUM[s-1] = dig
  elif NUM[s-1] > dig:
    NUM[s-1] = dig
 
if N > 1:
  if NUM[0] == -1 or NUM[0] == 0:
    isOK = False
 
if isOK != True:
  print(-1)
else:
  for i in range(N):
    if NUM[i] == -1:
      NUM[i] = 0
  numChar = ""
  for iNum in NUM:
    numChar += str(iNum)
  print(int(numChar))

### FIXED CODE ###

line = input().split()
N, M = int(line[0]), int(line[1]) 

if M == 0:
  if N == 1:
    print(0)
  else:
    print(10**(N-1))
  quit()

conds = []
for i in range(M):
  line = input().split()
  conds.append((int(line[0]),int(line[1])))
 
NUM = [-1] * N
 
isOK = True
for curCon in conds:
  s = curCon[0]
  dig = curCon[1]
  
  if NUM[s-1] == -1:
    NUM[s-1] = dig
  elif NUM[s-1] != dig:
    isOK = False
 
if N > 1:
  if NUM[0] == 0:
    isOK = False
 
if isOK != True:
  print(-1)
  quit()
else:
  if NUM[0] == -1:
    NUM[0]=1
    
  for i in range(N):
    if NUM[i] == -1:
      NUM[i] = 0
  numChar = ""
  for iNum in NUM:
    numChar += str(iNum)
  print(int(numChar))
n, k = map(int,input().split())
h = list(map(int,input().split()))
ans = 0
for i in range(n):
  if n[0] >= k:
    ans += 1
print(ans)

### FIXED CODE ###

n, k = map(int,input().split())
h = list(map(int,input().split()))
ans = 0
for i in range(n):
  if h[i] >= k:
    ans += 1
print(ans)
H, W = map(int, input().split())
S = [list(input()) for __ in range(H)]

dl = [(-1, 0), (0, 1), (1, 0), (0, -1)]
for i, row in enumerate(S):
    for j, val in enumerate(row):
        if val == '.':
            continue

        can_paint = False
        for dx, dy in dl:
            di, dj = i + dx, j + dy
            if di < 0 or H <= di or dj < 0 or W <= dj:
                continue
            if S[di][dj] == '#':
                can_paint = True
                break
        if not can_paint:
            print('No')
            return
print('Yes')

### FIXED CODE ###

def resolve():
    H, W = map(int, input().split())
    S = [list(input()) for __ in range(H)]

    dl = [(-1, 0), (0, 1), (1, 0), (0, -1)]
    for i, row in enumerate(S):
        for j, val in enumerate(row):
            if val == '.':
                continue

            can_paint = False
            for dx, dy in dl:
                di, dj = i + dx, j + dy
                if di < 0 or H <= di or dj < 0 or W <= dj:
                    continue
                if S[di][dj] == '#':
                    can_paint = True
                    break
            if not can_paint:
                return 'No'
    return 'Yes'

print(resolve())
X = input()

if X>=30:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

X = int(input())

if X>=30:
    print('Yes')
else:
    print('No')
N = int(input())
a = list(map(int, input().split()))
a.sort()
for i in range(N):
  if i % 2 == 1:
    s += a[-i]
  else:
    s -= a[-i]
print(s)

### FIXED CODE ###

N = int(input())
a = list(map(int, input().split()))
a.sort()
s = 0
for i in range(1, N + 1):
  if i % 2 == 1:
    s += a[-i]
  else:
    s -= a[-i]
print(s)
def main(n):
    l=[i for i in range(1,n+1)]
    ans=0
    for i in l:
        for j in l:    
            if str(i)[0]==str(j)[-1] and str(j)[0]==str(i)[-1]:
                # print(i,j)
                ans+=1
                
    print(ans)
n=init(input())
main(n)

### FIXED CODE ###

c={}
for i in range(1,10):
  for j in range(1,10):
    l=str(i)
    r=str(j)
    c[l+r]=0


n=int(input())
for i in range(1,n+1):
  l=str(i)[0]
  r=str(i)[-1]
  try:
    c[l+r]+=1
  except:
    pass
  
      
ans=0
for i in range(1,10):
  for j in range(1,10):
    l=str(i)
    r=str(j)
    ans+=c[l+r]*c[r+l]
    
    
print(ans)
import copy

n = int(input())
max_1 = None
max_2 = None

for i in range(n):
    a = int(input())
    if max_1 is None:
        max_i = [i]
        max_1 = a
    elif max_1 == a:
        max_i.append(i)
    elif max_2 < a:
        if max_1 < a:
            max_2 = max_1
            max_i = [i]
            max_1 = a
        else:
            max_2 = a
    
if len(max_i) >= 2:
    out_list = [max_1 for i in range(n)]
else:
    out_list = [max_1 for i in range(n)]
    out_list[max_i[0]] = max_2
    
print("\n".join(map(str, out_list)))

### FIXED CODE ###


n = int(input())
a = []

for i in range(n):
    a.append(int(input()))
    
a_copy = list(a)
a.sort(reverse=True)

max_1 = a[0]
max_count = a.count(max_1)

for i in a:
    if i < max_1:
        max_2 = i
        break
        
for a in a_copy:
    if a == max_1 and max_count == 1:
        print(max_2)
    else:
        print(max_1)
A, B = (int(i) for i in input().split())
1 <= B <= A <= 20
 
if A % B == 0：
    print(A+B)
else:
    print(A-B)

### FIXED CODE ###

A, B = map(int, input().split())
 
if B % A == 0:
    print(A + B)
else:
    print(B - A)
import math


def run(n, x, xx):
    xx.append(x)
    xx = sorted(xx)
    d = [xx[i+1]-xx[i] for i in range(n)]
    d = sorted(d)
    min_d = d[0]
    if len(d) == 1:
        return min_d
    for i in range(1, len(d)):
        min_d = math.gcd(min_d, d[i])
        if d[i] % min_d == 0:
            return min_d


def main():
    n, x = map(int, input().split())
    xx = list(map(int, input().split()))
    print(run(n, x, xx))


if __name__ == '__main__':
    main()


### FIXED CODE ###

import fractions


def run(n, x, xx):
    xx.append(x)
    xx = sorted(xx)
    d = [xx[i+1]-xx[i] for i in range(n)]
    d = sorted(d)
    min_d = d[0]
    if len(d) == 1:
        pass
    else:
        for i in range(1, len(d)):
            min_d = fractions.gcd(min_d, d[i])
    return min_d


def main():
    n, x = map(int, input().split())
    xx = list(map(int, input().split()))
    print(run(n, x, xx))


if __name__ == '__main__':
    main()
abc = list(map(int, input().split()))
abc[0],abc[1],abc[2] = abc[2],abc[0],abc[1]
print(f'{abc[0]} {abc[1]} {abc[2]}')


### FIXED CODE ###

x, y, z = map(int,input().split())
print(z,x,y)
print(replace(input(),'7','8',1))

### FIXED CODE ###

print(input().replace('7','8',1))
def main():
    N, A, B = map(int, input().split())

    num = tuple(range(A, B+1))
    n = len(num)
    cmb = n ** (N - 2)
    ans = (cmb + 1) // 2
    print(int(ans))

main()


### FIXED CODE ###

def main():
    N, A, B = map(int, input().split())

    if A > B or (N == 1 and A != B):
        ans = 0
    elif N == 1:
        ans = 1
    else:
        ans = (N - 2) * (B - A) + 1
    print(ans)

main()
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

MOD = 10 ** 9 + 7
S = sr()
# 桁DP, 上から
dp = [0] * 13
dp[0] = 1
for i in range(len(S)):
    prev = dp.copy()
    num = S[i]
    dp = [0] * 13
    if num.isdigit():
        num = int(num)
        for j in range(13):
            dp[(10*j+num)%13] = prev[j]
    else:
        for j in range(13):
            for k in range(10):
                dp[(10*j+k)%13] += prev[j]
            dp[j] %= MOD

answer = dp[5]
print(answer%MOD)


### FIXED CODE ###

MOD = 10 ** 9 + 7
S = input()

dp = [0] * 13
dp[0] = 1

for s in S:
  prev = [x for x in dp]
  dp = [0] * 13
  if s == '?':
    add = range(10)
  else:
    add = [int(s)]
  for i in range(13):
    for x in add:
      dp[(10*i+x)%13] += prev[i]
  dp = [x % MOD for x in dp]
  
print(dp[5])
# coding: utf-8
import re
import math
#import numpy as np

mod=int(10**9+7)

def lcm(a,b):
    return a*b//math.gcd(a,b)

#main
N=int(input())
A=list(map(int,input().split()))
l=A[0]
for a in A:
    l=lcm(l,a)

ans=0
for a in A:
    ans+=l//a
    ans%=mod
print(ans)

### FIXED CODE ###

# coding: utf-8
import re
import math
import fractions
#import numpy as np

mod=int(10**9+7)


def lcm(a,b):
    ab=a*b
    return ab//fractions.gcd(a,b)

#main
N=int(input())
A=list(map(int,input().split()))
l=A[0]
for a in range(1,N):
    l=lcm(l,A[a])
l%=mod

ans=0
for a in A:
    ans+=l*pow(a,mod-2,mod)
    ans%=mod
print(ans)
x=input("")
k=0
while(pow(2,k)<=x):
  k+=1
print(k)

### FIXED CODE ###

x=int(input(""))
k=0
while True:
  if pow(2,k)>x:
    break
  k+=1
print(pow(2,k-1))
r, g = map(int, input().split())
print(int(g * 2 - r))

### FIXED CODE ###

r, g = [int(input()) for _ in range(2)]
print(int(g * 2 - r))
S = input()

if S[2:3] > 12 and S[:1] == '00':
  print('NA')
else:
  if S[2:3] > 12:
    print('YYMM')
  elif S[:1] == '00':
    print('MMYY')
  else:
    print('AMBIGUOUS') 

### FIXED CODE ###

S = input() 
is_yymm = 1 <= int(S[2:4]) <= 12
is_mmyy = 1 <= int(S[0:2]) <= 12

if is_mmyy and is_yymm:
    print('AMBIGUOUS') 
elif is_yymm:
    print('YYMM')
elif is_mmyy:
    print('MMYY')
else:
    print('NA')
import sys
s = str(input())
t = str(input())
lst = []
i= 0
if len(s) < len(t):
  print('UNRESTORABLE')
  sys.exit()
  
else:
  for _ in range(len(s)):
    if s[_] == t[i] or s[_] == '?':
        i += 1       
    else:   
        i = 0
    if i == len(t):
      pt = _ - i + 1    
      s = s.replace(s[pt:_ + 1],t)
      lst.append(s)

if lst:
  lst = [_.replace('?','a') for _ in lst]
  sorted(lst)
  print(lst[0])

else:
  print('UNRESTORABLE')

### FIXED CODE ###

s = str(input())
t = str(input())
lst = []
i= 0
for ss in range(len(s)-len(t)+1):
  flg = 1
  i= 0
  for tt in range(len(t)):
    now = ss + tt
    if s[now] == t[tt] or s[now] == '?':
      pass
    else:
      flg = 0
  if flg:
    ns = list(s)
    ns[ss:now+1] = list(t)
    lst.append(("").join(ns))
if lst:
  lst = [_.replace('?','a') for _ in lst]
  lst.sort()
  print(lst[0])

else:
  print('UNRESTORABLE')
from collections import deque
import numpy as np
import sys

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

Map = [[] for _ in range(H)]
reached = [[-1] * W for _ in range(H)]
q = deque()
cnt = 0
count = 0
tempList = []
for y in range(H):
    for i, x in enumerate(input()):
        Map[y].append(x)
        if x == "#":
            cnt += 1
            reached[y][i] = 0
            tempList.append((i + 1, y, -1))
            tempList.append((i - 1, y, -1))
            tempList.append((i, y + 1, -1))
            tempList.append((i, y - 1, -1))

q.append(tempList)


def BFS(blist):
    global count
    global cnt
    tList = []

    count += 1

    for (x, y, pre) in blist:
        if x >= W or y >= H or x < 0 or y < 0 or reached[y][x]>=0:
            continue

        reached[y][x] = pre + 1
        Map[y][x] = "#"

        tList.append((x + 1, y, pre + 1))
        tList.append((x - 1, y, pre + 1))
        tList.append((x, y + 1, pre + 1))
        tList.append((x, y - 1, pre + 1))

    if np.where(np.array(reached)>=0, True, False).all():
        print(count)
        sys.exit()

    q.append(tList)


while q:
    BFS(q.popleft())













### FIXED CODE ###

from collections import deque

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

Map = [[] for _ in range(H)]
reached = [[False] * W for _ in range(H)]
q = deque()
cnt = 0
count = 0
tempList = []
for y in range(H):
    for i, x in enumerate(input()):
        Map[y].append(x)
        if x == "#":
            cnt += 1
            reached[y][i] = True
            if i + 1 < W and not reached[y][i + 1]:
                reached[y][i + 1] = True
                tempList.append((i + 1, y))

            if i > 0 and not reached[y][i - 1]:
                reached[y][i - 1] = True
                tempList.append((i - 1, y))

            if y + 1 < H and not reached[y + 1][i]:
                reached[y + 1][i] = True
                tempList.append((i, y + 1))

            if y > 0 and not reached[y - 1][i]:
                reached[y - 1][i] = True
                tempList.append((i, y - 1))
if cnt==H*W:
    print(0)
    exit()

q.append(tempList)


def BFS(blist):
    global count
    tList = []

    count += 1

    for (x, y) in blist:
        if x+1<W and not reached[y][x + 1]:
            reached[y][x + 1] = True
            tList.append((x + 1, y))

        if x-1>=0 and not reached[y][x - 1]:
            reached[y][x - 1] = True
            tList.append((x - 1, y))

        if y+1<H and not reached[y + 1][x]:
            reached[y + 1][x] = True
            tList.append((x, y + 1))

        if y-1>=0 and not reached[y - 1][x]:
            reached[y - 1][x] = True
            tList.append((x, y - 1))

    if tList:
        q.append(tList)


while q:
    BFS(q.popleft())

print(count)
j = int(input())
A = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(A[k-1])

### FIXED CODE ###

A = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
k = int(input())
print(A[k-1])
n = int(input())
A = list(map(int,input().split()))
B = []
C = []
for num in A:
    if num in B: 
        C[B.index(num)] += 1
    else:
        B.append(num)
        C.append(1)

if len(B) > 2:
    print('No')
elif len(B) == 1:
    if N == B[0] +1:
        print('Yes')
    elif N//B[0] >= 2:
        print('Yes')
    else:
        print('No')
elif B[0]  == (B[1]+1):
    k = C[1]
    m = B[1]
    if m-k+1 <= 0:
        print('No')
    elif (n-k) % (m-k+1) == 0:
        print('Yes')
    else:
        print('No')
elif B[1] == (B[0]+1):
    k = C[0]
    m = B[0]
    if m-k+1 <= 0:
        print('No')
    elif (n-k) % (m-k+1) == 0:
        print('Yes')
    else:
        print('No')
else:
    print('No')

### FIXED CODE ###

n = int(input())
A = list(map(int,input().split()))
B = []
C = []
for num in A:
    if len(B) >= 3:
        print("No")
        break
    elif num in B: 
        C[B.index(num)] += 1
    else:
        B.append(num)
        C.append(1)


if len(B) >= 3:
    pass
elif len(B) == 1:
    if n == B[0] +1:
        print('Yes')
    elif n//B[0] >= 2:
        print('Yes')
    else:
        print('No')
elif B[0]  == (B[1]+1):
    k = C[1]
    m = B[1]
    if m-k+1 <= 0:
        print('No')
    elif (n-k) % (m-k+1) == 0:
        print('Yes')
    else:
        print('No')
elif B[1] == (B[0]+1):
    k = C[0]
    m = B[0]
    if m-k+1 <= 0:
        print('No')
    elif (n-k) % (m-k+1) == 0:
        print('Yes')
    else:
        print('No')
else:
    print('No')
a,b = map(int,input().split())
print(int(a*b))

### FIXED CODE ###

from decimal import Decimal
a,b = input().split()
print(int(Decimal(a)*Decimal(b)))
A,B,K = map(int,input().split())



if A==B:
    print("0 0")
elif A==0 and B==0:
    print(f"{A} {B}")
else:
    least = min(A,B)
    more = max(A,B)
    K-=least
    if K:
        more-=K
    if min(A,B)==A:
        print(f"0 {more}")
    else:
        print(f"{more} 0") 

 

### FIXED CODE ###

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

def print_ans(A,B):
        print(A,end=" ")
        print(B)


if A+B<=K:
    print("0 0")
elif A==B and A==0:
    print(A,end=" ")
    print(B)
else:

    if K>=A: 
        K-=A 
        A=0
        B-=K
        print_ans(A,B)
    else: 
        A-=K
        K=0
        print_ans(A,B)
in = input()

if in == "T":
  return "A"
if in == "A":
  return "T"
if in == "C":
  return "G"
if in == "G":
  return "C"


### FIXED CODE ###

if __name__ == '__main__':
  V = input()
  
  if V == "T":
  	print("A")
  
  if V == "A":
    print("T")
  
  if V == "C":
    print("G")
  
  if V == "G":
    print("C")
x,t=map(int,raw_input().split())
if t>X:
  print 0 
else:
  print X-t

### FIXED CODE ###

X,t=map(int,raw_input().split())
if t>=X:
  print "0" 
else:
  print X-t
N = int(input())

min = 999999

A = 0
B = 0

for i in range(1, N/2):
    a = i
    b = N - i
    
    s = str(a)
    array = list(map(int, list(s)))
    suma = sum(array)
    
    s = str(b)
    array = list(map(int, list(s)))
    sumb = sum(array)

    aaa = suma + sumb
    if min > aaa:
        min = aaa   

print(min)

### FIXED CODE ###

N = int(input())
min = 999999

A = 0
B = 0

def digitSum(n):
    s = str(n)
    array = list(map(int, list(s)))
    return sum(array)

for i in range(1, N/2+1):
    a = i
    b = N - i

    if min > digitSum(a) + digitSum(b):
        min = digitSum(a) + digitSum(b)   

print(min)
from collections import deque

def bfs(maze, visited, sy, sx, gy, gx):
  queue = deque([[sy, sx]])
  visited[sy][sx] = 0
  while queue:
    y,x = queue.popleft()
    if [y, x] == [gy, gx]:
      return visited[y][x]
    for j, k in ([1, 0], [-1, 0], [0, 1], [0, -1]):
      new_y, new_x = y+j, x+k
      if maze[new_y][new_x] == "." and visited[new_y][new_x] == -1:
        visited[new_y][new_x] = visited[y][x] + 1
        queue.append([new_y, new_x])

h,w = map(int,input().split())
wall = ''
for i in range(w+2):
  wall += '#'
maze = [wall]
for i in range(h) :
  m1 = input()
  maze.append('#'+m1+'#')
maze .append(wall)

s = [[1,1],[1,h],[w,1],[w,h]]
g = [[w,h],[w,1],[1,h],[1,1]]

ans = []
for i in range(4) :
  sy = s[i][1] ; sx = s[i][0]
  for j in range(1,h+1) :
    for k in range(1,w+1) :
      gy = j ; gx = k
      if maze[gy][gx] == '#' :
        break
      visited = [[-1]*(w+2) for _ in range(h+2)]
      ans.append(bfs(maze, visited, sy, sx, gy, gx))

print(max(ans))

### FIXED CODE ###

from collections import deque

def bfs(maze, visited, sy, sx):
  queue = deque([[sy, sx]])
  visited[sy][sx] = 0
  va = 0
  while queue:
    y,x = queue.popleft()
    if visited[y][x] > va :
      va = visited[y][x]
    for j, k in ([1, 0], [-1, 0], [0, 1], [0, -1]):
      new_y, new_x = y+j, x+k
      if maze[new_y][new_x] == "." and visited[new_y][new_x] == -1:
        visited[new_y][new_x] = visited[y][x] + 1
        queue.append([new_y, new_x])
  return va

h,w = map(int,input().split())
wall = ''
for i in range(w+2):
  wall += '#'
maze = [wall]
for i in range(h) :
  m1 = input()
  maze.append('#'+m1+'#')
maze .append(wall)

ans = []
for sy in range(1,h+1) :
  for sx in range(1+w+1):
    if maze[sy][sx] == '#' :
      continue
    visited = [[-1]*(w+2) for _ in range(h+2)]
    ans.append(bfs(maze, visited, sy, sx))

print(max(ans))
if S <= W:
  print('unsafe')
else:
  print('safe')

### FIXED CODE ###

S,W=(int(x) for x in input().split())

if S <= W:
  print('unsafe')
else:
  print('safe')
n  = int(input())

a = list(map(int,input().split()))
b = list(map(int,input().split()))
ans = []
for i in range(n):
  ans.append(sum(a[0:i+1] + sum(b[i:n]))

print(max(ans))

### FIXED CODE ###

n  = int(input())

a = list(map(int,input().split()))
b = list(map(int,input().split()))
ans = []
for i in range(n):
  ans.append(sum(a[0:i+1]) + sum(b[i:n]))


print(max(ans))
S,W=map(int,input().split())
if S <= W:
  print('unsafe')
else
  print('safe')

### FIXED CODE ###

S,W=map(int,input().split())
if S <= W:
  print('unsafe')
else:
  print('safe')
ans=[]
for i in range(0,3):
    ele=int(input())
    ans.append(ele)
    
anns=set(ans)
if len(anns)==2:
    print("Yes")
else: print("No")

### FIXED CODE ###

s = set(map(int, input().split()))
if len(s) == 2:
    print("Yes")
else:
    print("No")
#### import ####
import sys
import math
from collections import defaultdict

#### 設定 ####
sys.setrecursionlimit(10**7)
def input():
  return sys.stdin.readline()[:-1]

#### 定数 ####
mod = 10**9 + 7

#### 読み込み ####
def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N):
  read_all = [tuple(map(int, input().split())) for _ in range(N)]
  return map(list,zip(*read_all))

#################

S = str(input())
'''
maxs = int(S.replace('?','9'))
div = maxs//13
counter = 0
'''
a = []
now = 0
for i in range(len(S)):
  if S[i]=='?':
    b = []
    for j in range(10):
      b.append((j*10**(len(S)-i-1) %13))
    a.append(b)
  else:
    now = (now+10**(len(S)-i-1)*int(S[i])) %13

counter = 0

dp=[[0 for j in range(13)] for i in range(len(a))]
for i in range(len(a)):
    if i==0:
      ## i==0のときの処理###
      for k in range(10):
        dp[i][(now+a[i][k])%13] = 1
      #####################
    else:
      for k in range(10):
        temp = a[i][k]
        for l in range(13):
          dp[i][(l+temp)%13] += dp[i-1][l]
          dp[i][(l+temp)%13] = dp[i][(l+temp)%13]%mod
print(dp[len(a)-1][5])

### FIXED CODE ###

#### import ####
import sys
import math
from collections import defaultdict

#### 設定 ####
sys.setrecursionlimit(10**7)
def input():
  return sys.stdin.readline()[:-1]

#### 定数 ####
mod = 10**9 + 7

#### 読み込み ####
def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N):
  read_all = [tuple(map(int, input().split())) for _ in range(N)]
  return map(list,zip(*read_all))

#################

S = str(input())
n = len(S)
if n==1:
  if S=='5' or S=='?':
    print(1)
  else:
    print(0)
  exit()

dp=[[0]*13 for i in range(n)]
for i in range(n):
  if i==0:
    if S[i]!='?':
      dp[i][int(S[i])] += 1
    else:
      for j in range(10):
        dp[i][j] += 1
  else:
    if S[i]!='?':
      for k in range(13):
        dp[i][(k*10+int(S[i]))%13] += dp[i-1][k]
    else:
      for j in range(10):
        for k in range(13):
          dp[i][(k*10+j)%13] += dp[i-1][k]
    for k in range(13):
      dp[i][k] %= mod
print(dp[n-1][5])
S = input()
T = input()

tmp = 'UNRESTORABLE' 
ans = []
flag = True

for i in range(len(S)):
    if S[i] == T[0]:
        for j in range(0, len(T)):
            if S[i+j] != T[j] and S[i+j] != '?':
                flag = False
            ans.append(T[j])
    elif len(ans) < len(S):
        if S[i] == '?':
            ans.append('a')
        else:
            ans.append(S[i])

for i in range(len(T)):
    if not T[i] in ans:
        flag = False
if flag:
    for i in range(len(ans)):
        print(ans[i], end='')
    print()
else:
    print(tmp)    


### FIXED CODE ###

S = input()
T = input()

ans = 'UNRESTORABLE' 

def match(k):
    for i in range(len(T)):
        if T[i] != S[i+k] and S[i+k] != '?':
            return False
    return True

def construct(k):
    ans = []
    for i in range(len(S)): ans.append(S[i])
    for i in range(len(T)): ans[i+k] = T[i]
    for i in range(len(S)):
        if ans[i] == '?':
            ans[i] = 'a'
    return ans

for i in range(len(S)-len(T)+1):
    if match(i):
        ans=construct(i)

for i in range(len(ans)):
    print(ans[i], end='')
print()
n = int(input())
p = list(map(int,input().split()))

m=2*(10**5)+1
count = 0
for i in range(0, n):
  if p[i] <= m:
    m = p[i]
    count = count + 1

print(count)

### FIXED CODE ###

n,m=map(int,input().split())
if n == m:
  print('Yes')
else:
  print('No')
summation = sum([int(i) for i in s])
is_mul = summation%9
if is_mul == 0:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

s = input()
summation = sum([int(i) for i in s])
is_mul = summation%9
if is_mul == 0:
  print("Yes")
else:
  print("No")
pages = input()
count = int(pages)

if count %2 = 0 :
    print(count/2)

else :
    print((count + 1)/2)

### FIXED CODE ###

import math

pages = input()
count = int(pages)

if count %2 == 0 :
    print(count/2)
else :
    print((count + 1)/2)