Harryxun/stf_run huggingface dataset:
a = input()
b = input()
c = input()
d = input()
e = input()
k = input()

if(e-a > k):
    print(':(')
else:
    print('Yay!')


### 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!')
n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
a1 = sum(A)
for i in range(N):
  b = B[i]
  if A[i] >= b:A[i] -= b
  else:
    if A[i+1]+A[i] >= b:
      A[i+1] = A[i+1]+A[i]-b
      A[i] = 0
    else:A[i], A[i+1] = 0, 0
a2 = sum(A)
print(a1-a2)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
res = 0
for i in range(n):
    t1 = min(a[i], b[i])
    a[i] -= t1
    b[i] -= t1
    res += t1
    t2 = min(a[i+1], b[i])
    a[i+1] -= t2
    b[i] -= t2
    res += t2
print(res)
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log2, floor
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

H, N = MAP()
temp = [LIST() for _ in range(N)]
temp = [list(x) for x in zip(*temp)]
A, B = temp[0], temp[1]

DP = [[INF]*(H + max(A) + 1) for _ in range(N + 1)]
DP[0][0] = 0
a = max(A)

for i in range(N):
	for j in range(H + a + 1):
		if j < A[i]:
			DP[i+1][j] = DP[i][j]
		else:
			DP[i+1][j] = min(DP[i][j], DP[i+1][j-A[i]] + B[i])

print(min(DP[N][H:H + max(A) + 1]))

### FIXED CODE ###

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, floor
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

H, N = MAP()
temp = [LIST() for _ in range(N)]
temp = [list(x) for x in zip(*temp)]
A, B = temp[0], temp[1]

DP = [[INF]*(H + max(A) + 1) for _ in range(N + 1)]
DP[0][0] = 0
a = max(A)

for i in range(N):
	for j in range(H + a + 1):
		if j < A[i]:
			DP[i+1][j] = DP[i][j]
		else:
			DP[i+1][j] = min(DP[i][j], DP[i+1][j-A[i]] + B[i])

print(min(DP[N][H:H + max(A) + 1]))
a, b, c, d = map(int, input().split())

print(max(min(b, d) - max(a, c)), 0)


### FIXED CODE ###

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

print(max(min(b, d) - max(a, c), 0))
N=int(input())
print((N-1)*int(N/2)))

### FIXED CODE ###

N=int(input())
print((N-1)*N//2)
n = int(input())


def digits_of(n):
    digits = [] 
    while n != 0:
        r = n % 10 
        digits.append(r) 
        n = n // 10  
    return digits


def is_multiple_of_9(n): 
    sum = 0  
    for i in digits_of(n):
        sum += i
    return sum % 9 == 0


if is_multiple_of_9(n):
    print("Yes")
else:
    print("No")


### FIXED CODE ###

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

result = n // x
result2 = n % x
if result2 != 0:
    result += 1
result *= t
print(result)
from statistics import mode

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

aa = list(map(lambda e: e[1] - (e[0] + 1), enumerate(a)))
minb = mode(aa)
ans = sum(map(lambda ea: abs(ea - minb), aa))

print(ans)

### FIXED CODE ###

from statistics import median

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

aa = list(map(lambda e: e[1] - (e[0] + 1), enumerate(a)))
minb = median(aa)


ans = int(sum(map(lambda ea: abs(ea - minb), aa)))

print(ans)
n, p = map(int, input().rstrip().split())
s = input().rstrip()

if p == 2 or p == 5:
    ans = 0
    s = map(int, s)
    for i, c in enumerate(s):
        if c % p == 0:
            ans += i + 1
    print(ans)
else:
    s = s[::-1]
    cnt = [0] * p
    k = 0
    cnt[k] = 1
    for i, c in enumerate(map(int(s))):
        k = (c * (10**i) + k) % p
        cnt[k] += 1

    ans = 0
    for i in range(p):
        ans += cnt[i] * (cnt[i] - 1) // 2
    print(ans)


### FIXED CODE ###

n, p = map(int, input().rstrip().split())
s = input().rstrip()

if p == 2 or p == 5:
    ans = 0
    s = map(int, s)
    for i, c in enumerate(s):
        if c % p == 0:
            ans += i + 1
    print(ans)
else:
    s = s[::-1]
    cnt = [0] * p
    k = 0
    cnt[k] = 1
    w = 1
    for i, c in enumerate(map(int, s)):
        k = c * w + k
        w *= 10
        while k >= p:
            k -= p
        while w >= p:
            w -= p
        cnt[k] += 1

    ans = 0
    for i in range(p):
        ans += cnt[i] * (cnt[i] - 1) // 2
    print(ans)
n, m = map(int, stdin.readline().strip().split())
print(n*m)

### FIXED CODE ###

from sys import stdin, stdout
n, m = map(int, stdin.readline().strip().split())
print(n*m)
S = str(input())
odd = ""
even = ""
flag=0
for i in range(len(S)):
  if i % 2 == 0:
    odd += S[i]
  else:
    even += S[i]    
odd = list(set(odd))
even = list(set(even))
if len(odd) == 3 and len(even) == 3:
  for i in range(len(odd)):
    if (odd[i] == 'R') or (odd[i] == 'U') or (odd[i] == 'D'):
      pass
    else:
      flag=1
  for j in range(len(even)):
    if (odd[i] == 'L') or (odd[i] == 'U') or (odd[i] == 'D'):
      pass
    else:
      flag=1
  if flag=0:
    print('Yes')
  else:
    print('No')
else:
  print('No')

### FIXED CODE ###

S = str(input())
for i in range(len(S)):
  if i % 2 == 0:
    if S[i] == 'L':
      print('No')
      exit()
    else:
      pass
  else:
    if S[i] == 'R':
      print('No')
      exit()
    else:
      pass
print('Yes')
import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

x, n =na()
p = na()
notp = list()
for i in range(1, 101):
    if i in p:
        continue
    notp.append(i)
ans = notp[0]

for i in notp:
    if abs(ans - x) > abs(i - x):
        ans = i
print(ans)
    

### FIXED CODE ###


import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

x, n =na()
p = na()

ans = x
for i in range(100):
    temp = x - i
    if not temp in p:
        print(temp)
        quit()
    temp = x + i
    if not temp in p:
        print(temp)
        quit()
def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
N = 10**5
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )
    
n=int(input())
a=list(map(int,input().split()))
data=[0]*(n+1)
for i in range(n+1):
    data[a[i]]+=1
for i in range(1,n+1):
    if data[i]==2:
        b=i
        break
l=[]
for i in range(n+1):
    if a[i]==b:
        l.append(i)
c=l[1]-l[0]+1
for k in range(1,n+3-c):
    ans=cmb(n+1,k,mod)-cmb(n+1-c,k-1,mod)
    print(ans%mod)
for k in range(n+3-c,n+2):
    ans=cmb(n+1,k,mod)
    print(ans)

### FIXED CODE ###

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
N = 10**5+1
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )
    
n=int(input())
a=list(map(int,input().split()))
data=[0]*(n+1)
for i in range(n+1):
    data[a[i]]+=1
for i in range(1,n+1):
    if data[i]==2:
        b=i
        break
l=[]
for i in range(n+1):
    if a[i]==b:
        l.append(i)
c=l[1]-l[0]+1
for k in range(1,n+3-c):
    ans=cmb(n+1,k,mod)-cmb(n+1-c,k-1,mod)
    print(ans%mod)
for k in range(n+3-c,n+2):
    ans=cmb(n+1,k,mod)
    print(ans)
a = int(input())
if a < 1200:
  print("ABC")
else if a < 2800:
  print("ARC")
else:
  print("AGC")

### FIXED CODE ###

a = int(input())
if a < 1200:
 print("ABC")
elif a < 2800:
 print("ARC")
else:
 print("AGC")
X = input()

while(1):
  for i in range(2,X):
    if X%i == 0:
      X += 1
      break
    if i == X-1:
      break

print(X)

### FIXED CODE ###

X = int(input()) 

while(1):
  if X == 2:
    break
  for i in range(2,X):
    if X%i == 0:
      X += 1
      break
  if i == X-1:
      break

print(X)
import math

N, D = map(int, input().split())
ans = 0

for i in range(N):
    x, y = map(int, input().split())
    if math.sqrt(x**2 + y**2) =< D:
        ans += 1

print(ans)

### FIXED CODE ###

import math

N, D = map(int, input().split())
ans = 0

for i in range(N):
    x, y = map(int, input().split())
    if math.sqrt(x**2 + y**2) <= D:
        ans += 1

print(ans)
i = input().rstrip()

T = ['dreamer', 'dream', 'eraser', 'erase']

def exec(s):
    for t in T:
        if s.startswith(t):
            n = s.replace(t, '', 1)
            if len(n) == 0:
                print('YES')
                exit()
            else:
                exec(n)

exec(i)
print('NO')

### FIXED CODE ###

i = input()[::-1]
T = []
for t in ['dreamer', 'dream', 'eraser', 'erase']:
    T.append(t[::-1])

match = True
while match:
    match = False
    for t in T:
        if i.startswith(t):
            match = True
            i = i.replace(t, '', 1)
            if len(i) < 1:
                print('YES')
                exit()

print('NO')
a = list(map(int,input().split()))
print(0 if x[0]<a[1] else 10)


### FIXED CODE ###

a = list(map(int,input().split()))
print(0 if a[0]<a[1] else 10)
import math
a, b = map(int, input().split())

print(int(a * b / math.gcd(a, b)))


### FIXED CODE ###


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

print(int(a * b / fractions.gcd(a, b)))
import numpy as np
S = input()

Q = int(input())

A = np.array([S])

for i in range(Q):
    s = input().split()
    if len(s) == 1:
        A = np.flip(A)
    else:
        if s[1] == '1':
            A = np.insert(A,0,np.array([s[2]]))
        else:
            A = np.append(A,np.array([s[2]]))

print('%s' % ''.join(A))



### FIXED CODE ###

Sr = list(input())
Sl = []
Q = int(input())


for i in range(Q):
    s = list(input().split())
    if len(s) == 1:
        Sr,Sl = Sl,Sr
    elif s[1] == '1':
        Sl.append(s[2])
    else:
        Sr.append(s[2])
Sl.reverse()
print('%s' % (''.join(Sl) + ''.join(Sr)))
import math
a,b = map(int,input().split())
print(a*b//math.gcd(a,b))

### FIXED CODE ###

import fractions
a,b = map(int,input().split())
print(a*b//fractions.gcd(a,b))
l=input().split()
print(l[0]+l[2] if l[1] == '+' else l[0]-l[2])

### FIXED CODE ###

l=input().split()
print(int(l[0])+int(l[2]) if l[1] == '+' else int(l[0])-int(l[2]))
n=int(input())
t=map(int,input().split())
#n==len(t)
m=int(input())
px=[]
for i in range(n):
  px.append(map(input().split()))
res=0
for j in range(m):
  for k in range(n):	
    if j==px[j][0]:
      res+=px[j][1]
    else:
      res+=t[k]
  print(res)
  res=0

### FIXED CODE ###

n=int(input())
t=input().split()
#n==len(t)
m=int(input())
px=[]
for i in range(m):
  px.append(input().split())
res=0
for j in range(1,m+1):
  for k in range(1,n+1):	
    if k==int(px[j-1][0]):
      res+=int(px[j-1][1])
      #print(12345)
    else:
      res+=int(t[k-1])
      #print('drink')
  print(res)
  res=0
N、K = map(int,input().split())
H = list(map(int,input().split()))
count = 0
for i in range(N):
  if H[i] >= K:
    count += 1
print(count)


### FIXED CODE ###

N,K = map(int,input().split())
H = list(map(int,input().split()))
count = 0
for i in range(N):
  if H[i] >= K:
    count += 1
print(count)
import numpy as np


def maximum_profit(rs):
    ans = rs[1] - rs[0]
    for i in range(n):
        for j in range(i + 1, n):
            if ans < rs[j] - rs[i]:
                ans = rs[j] - rs[i]
    return ans


n = int(input())
rs = []
for _ in range(n):
    r = int(input())
    rs.append(r)

print(maximum_profit(rs))


### FIXED CODE ###

n = int(input())
r0 = int(input())
r1 = int(input())
min_r = min(r0, r1)
ans = r1 - r0
for _ in range(2, n):
    r = int(input())
    ans = max(ans, r - min_r)
    min_r = min(r, min_r)
print(ans)
words = stdin.readline().rstrip().split()
cards  = [int(x) for x in stdin.readline().rstrip().split()]
drop   = stdin.readline().rstrip()

if drop == words[0]:
    cards[0] -= 1
    print(cards[0] + " " + cards[1])
elif drop == words[1]:
    cards[1] -= 1
    print(cards[0] + " " + cards[1])

### FIXED CODE ###

words = input().split()
cards  = [int(x) for x in input().split()]
drop   = input()

if drop == words[0]:
    cards[0] -= 1
    print(str(cards[0]) + " " + str(cards[1]))
elif drop == words[1]:
    cards[1] -= 1
    print(str(cards[0]) + " " + str(cards[1]))
# coding: utf-8
# Your code here!
eng_li = []
removed_list = []
all_letter = 5
for i in range (97,97+all_letter):
    eng_li.append(chr(i))

string = list(raw_input().strip())
length = len(string)
if length < all_letter:
    for i in string:
        eng_li.remove(i)
    string.append(eng_li[0])
    answer = "".join(string)
else:
    for i in range(all_letter-1):
        if ord(string[-1]) < ord(string[-2]) :
            removed_list.append(string[-1])
            string.pop()
        else:
            removed_list.append(string[-1])
            string.pop()
            print string[-1]
            removed_list=filter(lambda x:x>string[-1],sorted(removed_list))
            print removed_list
            string.pop()
            string.append(removed_list[0])
            answer ="".join(string)
            break
    else:
        answer = -1
print answer


    
        



### FIXED CODE ###

# coding: utf-8
# Your code here!
eng_li = []
removed_list = []
all_letter = 26
for i in range (97,97+all_letter):
    eng_li.append(chr(i))
 
string = list(raw_input().strip())
length = len(string)
if length < all_letter:
    for i in string:
        eng_li.remove(i)
    string.append(eng_li[0])
    answer = "".join(string)
else:
    for i in range(all_letter-1):
        if ord(string[-1]) < ord(string[-2]) :
            removed_list.append(string[-1])
            string.pop()
        else:
            removed_list.append(string[-1])
            string.pop()
            removed_list=filter(lambda x:x>string[-1],sorted(removed_list))
            string.pop()
            string.append(removed_list[0])
            answer ="".join(string)
            break
    else:
        answer = -1
print answer
import fractions
n = int(input())
a = list(map(int, input().split()))
b = [0] * 3
c = [0] * 3
for i in range(len(a)):
    if i == 0:
        b[i] = a[i]
        c[-i-1] = a[-i-1]
    else:
        b[i] = fractions.gcd(a[i], b[i-1])
        c[-i-1] = fractions.gcd(a[-i-1], c[-i])
b.insert(0, 0)
c.append(0)
m_gcd = 0
for i in range(len(b)-1):
    m_gcd = max(fractions.gcd(c[i+1], b[i]), m_gcd)
print(m_gcd)


### FIXED CODE ###

import fractions
n = int(input())
a = list(map(int, input().split()))
f = [0] * n
r = [0] * n
for i in range(n):
    if i == 0:
        f[i] = a[i]
        r[-i-1] = a[-i-1]
    else:
        f[i] = fractions.gcd(f[i-1], a[i])
        r[-i-1] = fractions.gcd(r[-i], a[-i-1])
f.insert(0, 0)
r.append(0)
ans = 0
for i in range(len(f) - 1):
    ans = max(ans, fractions.gcd(f[i], r[i+1]))
print(ans)
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f ==r -1:
        break

    if m + f  <= 80:
        print('A')

    if m + f == 60 < m + f ==80:
        print('B')

    if m + f == 50 < m + f ==65:
        print('C')

    if m + f == 30 < m + f ==50:
        print('D')

    if r <= 50:
        print('C')

    else:
        print('F')

### FIXED CODE ###

while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f == r == -1:
        break

    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')

    elif total < 50 and r < 50:
        print('D')

    elif total < 65:
        print('C')
        
    elif total < 80:
        print('B')

    else:
        print('A')
n = int(input())
import numpy as np
li = np.array([ int(it) for it in input().split()])
cs = np.cumsum(li)
import collections
cd = collections.Counter(cs)
sm = 0
for k,v in cd.items():
  p = v - 1 + (1 if k==0 else 0)
  sm += (p*(p+1))//2
print (sm)

### FIXED CODE ###

n = int(input())
import numpy as np
li = np.array([ int(it) for it in input().split()])
cs = np.cumsum(li)
import collections
cd = collections.Counter(cs)
sm = 0
for k,v in cd.items():
  p = v - 1 + (1 if k==0 else 0)
  sm += (p*(p+1))//2
print (sm)
## abc070d: Transit Tree Path

n = int(input())

T = [None]*(n+1)
for _ in range(n-1):
    v1,v2,d = map(int, input().split())
    if(T[v1] is None): T[v1] = [[v2,d]]
    else: T[v1].append([v2,d])
    if(T[v2] is None): T[v2] = [[v1,d]]
    else: T[v2].append([v1,d])

depth = [0 for _ in  range(n+1)]

def dfs(p, c, d):
    depth[c] = d
    for (v,vd) in T[c]:
        if v!=p: dfs(c, v, depth[c] + vd)

q,k = map(int, input().split())

dfs(0,k,0)

for _ in range(q):
    v1,v2 = map(int, input().split())
    print(depth[v1]+depth[v2])

### FIXED CODE ###

## abc070d: Transit Tree Path

n = int(input())

T = [None]*(n+1)
for _ in range(n-1):
    v1,v2,d = map(int, input().split())
    if(T[v1] is None): T[v1] = [[v1,v2,d]]
    else: T[v1].append([v1,v2,d])
    if(T[v2] is None): T[v2] = [[v2,v1,d]]
    else: T[v2].append([v2,v1,d])

depth = [0]*(n+1)

q,k = map(int, input().split())

is_visit = [False]*(n+1)
p,c,d = 0,k,0
depth[c] = d
is_visit[c] = True
stack = T[c]
while stack:
    p,c,d = stack.pop()
    if is_visit[c]: continue
    is_visit[c] = True
    depth[c] = depth[p] + d
    for pp,cc,dd in T[c]:
        if not is_visit[cc]: stack.append([pp,cc,dd])

for _ in range(q):
    v1,v2 = map(int, input().split())
    print(depth[v1]+depth[v2])
# -*- coding: utf-8 -*-

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

answer_list = []

prefectures = [0] * (M+1)
data_set = [0] * M

data_set_dict = {}

for i in range(M):
	P, Y = map(int, input().split())
	data_set[i] = [P,  Y]
	data_set_dict[P, Y] = i

data_set.sort()

for i in range(M):
	answer = ''
	P, Y = data_set[i]
	prefectures[P] += 1

	for j in range(6-len(list(str(P)))):
		answer += '0'

	answer += str(P)

	for j in range(6-len(list(str(prefectures[P])))):
		answer += '0'

	answer += str(prefectures[P])

	answer_list.append([data_set_dict[P, Y], answer])

answer_list.sort()

for i in range(M):
	print(answer_list[i][1])

### FIXED CODE ###

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

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

answer_list = [0] * M
prefectures = [0] * (N+1)
data_set = [0] * M

for i in range(M):
	P, Y = map(int, input().split())
	data_set[i] = [P, Y, i]

data_set.sort()

for i in range(M):
	answer = ''
	P, Y, a = data_set[i]
	prefectures[P] += 1

	for j in range(6-len(list(str(P)))):
		answer += '0'

	answer += str(P)

	for k in range(6-len(list(str(prefectures[P])))):
		answer += '0'

	answer += str(prefectures[P])

	answer_list[a] = answer

for i in range(M):
	print(answer_list[i])
X,Y = [input().split()]
if X>Y:
  print(">")
elif X<Y:
  print("<")
else:
  print("=")

### FIXED CODE ###

X,Y = input().split()
if X>Y:
  print(">")
elif X<Y:
  print("<")
else:
  print("=")
n = input()
l = []
v = []
for t in n:
  if t == 'A' or t == 'C' or t == 'G' or t == 'T':
    v.append(t)
  else:
    l.append(v)
    v = []
print(len(max(l)))

### FIXED CODE ###

S = input()
N = len(S)
ans = 0
for i in range(N):
  for j in range(i, N):
    if all('ACGT'.count(c) ==  1 for c in S[i : j + 1]):
      ans = max(ans, j - i + 1)
      
print(ans)
n = int(input())
c = n[-1]

if c in ["24579"]:
    print("hon")
elif c in ["0168"]:
    print("pon")
else:
    print("bon")

### FIXED CODE ###

n = int(input())
if n%10 in [2, 4, 5, 7, 9]:
    print("hon")
elif n%10 in [0, 1, 6,8]:
    print("pon")
else:
    print("bon")
s = list(input())

dp = [[0 for _ in range(13)] for _ in range(len(s))]
multi = 1
for i in range(10):
    if s[0] == '?':
        dp[0][i] = 1
    else:
        dp[0][int(s[0])] = 1
for i in range(1,len(s)):
    if s[i] == '?':
        for j in range(13):
            if dp[i-1][j] != 0:
                for k in range(10):
                    rest = (j*10+k)%13
                    dp[i][rest] += dp[i-1][j]
    else:
        for j in range(13):
            if dp[i-1][j] != 0:
                rest = (j*10+int(s[i]))%13
                dp[i][rest] += dp[i-1][j]
print(dp[i][5]%(10**9+7))


### FIXED CODE ###

S = [int(x) if x != "?" else -1 for x in input()]
g = 10 ** 9 + 7
x = 1
DP = [[0] * 13 for _ in range(2)]
DP[0][0] = 1
for i in range(len(S)):
    for j in range(13):
        DP[1][j] = DP[0][j] % g
        DP[0][j] = 0
    for j in range(13):
        if S[i] == -1:
            s = (j*10)%13
            e = (s+10)%13
        else:
            s = (j*10+S[i])%13
            e = (s+1)%13
        DP[0][s] += DP[1][j]
        if s > e:
            DP[0][0] += DP[1][j]
        DP[0][e] -= DP[1][j]
    w = 0
    for j in range(13):
        w += DP[0][j]
        DP[0][j] = w

print(DP[0][5] % g)
#n = int(input())
#l = list(map(int, input().split()))

'''
A=[]
B=[]
for i in range():
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)'''


import sys
input = sys.stdin.readline
s = input()
t = input()
flg = False
cnt = 0

for i in range(len(s)-len(t)+1):

    cnt = 0
    for j in range(len(t)):
        #print(s[i+j],t[j])
        if s[i+j] == t[j] or s[i+j] == '?':
            cnt += 1
            continue

    if cnt == len(t):
        flg = True
        print(cnt)
        break

if not flg:
    print("UNRESTORABLE")
else:
    li = list(s)
    for j in range(len(t)):
        li[cnt+j]=t[j]
    print("".join(li))



### FIXED CODE ###

#n = int(input())
#l = list(map(int, input().split()))

'''
A=[]
B=[]
for i in range():
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)'''


import sys
input = sys.stdin.readline
s = input().rstrip("\n")
t = input().rstrip("\n")
flg = False
cnt = 0

for i in range(len(s)-len(t)+1)[::-1]:
    cnt = 0
    for j in range(len(t)):
        #print(s[i+j],t[j])
        if s[i+j] == t[j] or s[i+j] == '?':
            cnt += 1
        #print(cnt,len(t))
    if cnt == len(t):
        cnt = i
        flg = True
        #print(cnt)
        break

if not flg:
    print("UNRESTORABLE")
else:
    li = list(s.replace("?", "a"))
    #print(li)
    for j in range(len(t))[::-1]:
        #print(li[cnt+j], t[j])
        li[cnt+j] = t[j]
    print("".join(li))
import math
n = int(input())
a = list(map(int,input().split()))

ans = 0
for i in range(int(math.log2(max(a)))+2):
    sum=0
    for j in range(n):
        sum+=(a[j]>>i) & 1
    ans+=sum*(n-sum)*(2**i)
    ans%=10**9+7
print(ans)


### FIXED CODE ###

import numpy as np
N = 10**9+7
n = int(input())
a = np.array(input().split(), np.int64)

ans = 0

po = 1
for i in range(61):
    bit = (a>>i) & 1
    s=np.count_nonzero(bit)
    ans+=s*(n-s)%N*po
    ans%=N
    po*=2
    po%=N
print(ans)
# 尺取り法
import sys

def input():
    return sys.stdin.readline()[:-1]

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

count = 0
right = 0
sum = 0
for left in range(N):
    while(sum < K):
        if right == N:
            break
        else:
            sum += a[right]
            right += 1
    if sum < K:
        break
    count += N - right + 1
    sum -= a[left]

print(count)


### FIXED CODE ###


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

if(X < A):
    print(0)
else:
    print(10)