Harryxun/stf_run huggingface dataset:
s = input()
x, y = map(int, input().split())
n = len(s)

D = [[], []]
st_x = 0
st_y = 0
st = 0
while st <= len(s)-1 and s[st] == "F":
    st_x += 1
    st += 1

di = 0
for i in range(st, n):
    if s[i] == "T":
        di = (di+1) % 2
        D[di].append(0)
    else:
        D[di][-1] += 1

# print(D)


ANS = [0, 0]
st_po = [st_x, st_y]
go_po = [x, y]
for i in range(2):
    mid = sum(D[i]) + 5
    DP = [[0] * (mid*2) for i in range(len(D[i]) + 1)]
    DP[0][st_po[i] + mid] = 1
    for j in range(len(D[i])):
        dd = D[i][j]
        for k in range(len(DP[0])):
            if 0 <= k-dd <= len(DP[0])-1 and 0 <= k+dd <= len(DP[0])-1:
                DP[j+1][k] = int(DP[j][k-dd] or DP[j][k+dd])

    ANS[i] = DP[-1][go_po[i]+mid]
    # print(DP)
# print(ANS)

print("Yes" if ANS[0] and ANS[1] else "No")

### FIXED CODE ###

s = input()
x, y = map(int, input().split())
n = len(s)

D = [[], []]
st_x = 0
st_y = 0
st = 0
while st <= len(s)-1 and s[st] == "F":
    x -= 1
    st += 1

di = 0
for i in range(st, n):
    if s[i] == "T":
        di = (di+1) % 2
        D[di].append(0)
    else:
        D[di][-1] += 1

# print(D)


ANS = [0, 0]
st_po = [0, 0]
go_po = [x, y]
for i in range(2):
    mid = sum(D[i]) + 5
    DP = [[0] * (mid*2) for i in range(len(D[i]) + 1)]
    DP[0][st_po[i] + mid] = 1
    for j in range(len(D[i])):
        dd = D[i][j]
        for k in range(len(DP[0])):
            aa = 0
            bb = 0
            if 0 <= k-dd <= len(DP[0])-1:
                aa = DP[j][k-dd]
            if 0 <= k+dd <= len(DP[0])-1:
                bb = DP[j][k+dd]

            DP[j+1][k] = int(aa or bb)

    if 0 <= go_po[i]+mid <= len(DP[0])-1:
        ANS[i] = DP[-1][go_po[i]+mid]
    # print("len",mid*2)
    #if i == 1:
        # print(DP[1][7999+mid])
# print(ANS)

print("Yes" if ANS[0] and ANS[1] else "No")
N, K = map(int, input().split())
S = list(list(input()))

a = []
temp = S[0]
hantei = False
s = []
n = []

for i in range(1, N):
    if hantei and temp != S[i]:
        s.append(a)
        n.append(len(a))
        a = []
    if temp != S[i] or hantei:
        hantei = True
        a.append(S[i])
        temp = S[i]

s.insert(0, list(S[0]))
s.append(list(S[-1]))
ans = 0
for i in range(K):
    ans = ans + 1 + max(n)
    k = n.index(max(n))
    n[k] = 0
print(ans)


### FIXED CODE ###

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

a = []
temp = S[0]
s = []
ans = 0

if len(S) > 1 and temp == S[1]:
    hantei = True
    a.append(temp)
else:
    hantei = False
    s.append(list(S[0]))

for i in range(1, N):
    if temp == S[i]:
        ans += 1
    if hantei and temp != S[i]:
        s.append(a)
        a = []
        hantei = False
    if temp != S[i] or hantei:
        hantei = True
        a.append(S[i])
        temp = S[i]
if len(S) > 1:
    s.append(a)

length = len(s)
for i in range(K):
    if length > 2:
        ans += 2
        length -= 2
    elif length == 2:
        ans += 1
        break

print(ans)
a = [0]*n
a = input().split()
n0 = a.count('0')
sum = int(a[0])
if n0 == 0:
  for k in range(len(a)-1):
    sum =sum*int(a[k+1])
    if sum >1000000000000000000:
      print(-1)
      break
  if sum >1000000000000000000:
    print(-1)
  else:
    print(sum)
else:
  print(0)

### FIXED CODE ###

n = int(input())
a = [0]*n
a = input().split()
n0 = a.count('0')
sum = int(a[0])
if n0 == 0:
  for k in range(len(a)-1):
    sum =sum*int(a[k+1])
    if sum >1000000000000000000:
      print(-1)
      break
  if sum <=1000000000000000000:
    print(sum)
else:
  print(0)
N=int(input())
B=list(map(int,input().split()))
A=[]
A.append(B[0])
A.append(B[0])
num=0
for i in B:
    if i==B[0]:
        num+=1
        continue
    elif A[num]<=B[num]:
        A.append(B[num])
        num+=1
    else:
        A[num]=B[num]
        A.append(B[num])
        num+=1

max_sum=0
for i in A:
    max_sum+=i
print(max_sum)



### FIXED CODE ###

N=int(input())
B=list(map(int,input().split()))
A=[]
A.append(B[0])
A.append(B[0])
num=0
for i in B:
    if num==0:        
        num+=1
    elif A[num]<=B[num]:
        A.append(B[num])
        num+=1
    elif A[num]>B[num]:
        A[num]=B[num]
        A.append(B[num])
        num+=1

max_sum=0
for i in A:
    max_sum+=i
print(max_sum)
n = int(input())
XY = []
for i in range(n):
    x, y = map(int, input().split())
    XY.append((x, y))

D = {}
for i in range(n):
    for j in range(n):
        if i == j:
            continue
        a = XY[i][0]
        b = XY[i][1]
        c = XY[j][0]
        d = XY[j][1]
        p = c-a
        q = d-b
        if (p, q) in D:
            D[(p, q)] += 1
        else:
            D[(p,q)] = 1

D = list(D.items())
D.sort(key = lambda x: -x[1])
print(n-D[0][1])


### FIXED CODE ###

n = int(input())
XY = []
for i in range(n):
    x, y = map(int, input().split())
    XY.append((x, y))

if n == 1:
    print(1)
    exit()
    
D = {}
for i in range(n):
    for j in range(n):
        if i == j:
            continue
        a = XY[i][0]
        b = XY[i][1]
        c = XY[j][0]
        d = XY[j][1]
        p = c-a
        q = d-b
        if (p, q) in D:
            D[(p, q)] += 1
        else:
            D[(p,q)] = 1

D = list(D.items())
D.sort(key = lambda x: -x[1])
print(n-D[0][1])
strList = input()
intList = [int(s) for s in strList]
sum = sum(intList)
if sum%9 == 0:
  print(Yes)
else:
  print(No)

### FIXED CODE ###

strList = list(input())
intList = [int(s) for s in strList]
if sum(intList)%9 == 0:
  print("Yes")
else:
  print("No")
n,m=map(int,input().split())
a=list(map(int,input().split()))
import fractions
lmc=a[0]
for i in range(1,n):
    lmc=lmc*a[i]//fractions.gcd(lmc,a[i])
    if lmc>m:
        print("0")
        exit()
if i in range(n):
   if (lmc//a[i])%2==0
   print("0")
   exit()
if (m%lmc)<lmc//2:
    print((m//lmc))
else:
    print((m//lmc)+1)


### FIXED CODE ###

n,m=map(int,input().split())
a = [int(x)//2 for x in input().split()]
import fractions
lmc=a[0]
for i in range(1,n):
    lmc=lmc*a[i]//fractions.gcd(lmc,a[i])
    if lmc>m:
        print("0")
        exit()
for i in range(n):
   if (lmc//a[i])%2==0:
      print("0")
      exit()
if (m//lmc)%2==0:
    print((m//lmc)//2)
else:
    print(((m//lmc)+1)//2)
# from math import sqrt
# from heapq import heappush, heappop
# from collections import deque
from operator import mul
from functools import reduce
# a, b = [int(v) for v in input().split()]


def main():

    mod = 1000000007

    def modpow(n, k, mod):
        if k == 0:
            return 1
        val = modpow(n, k // 2, mod)
        val = (val * val) % mod
        if k % 2 != 0:
            val *= n
        return val

    def modcmb(n, r, mod):
        if r < 0 or r > n:
            return 0
        r = min(r, n - r)
        over = reduce(lambda v1, v2: (v1 * v2) % mod, range(n, n-r, -1))
        under = reduce(lambda v1, v2: (v1 * v2) % mod, range(1, r+1))
        return over * modpow(under, mod - 2, mod) % mod

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

    count = modpow(2, n, mod) - 1
    count -= modcmb(n, a, mod)
    count -= modcmb(n, b, mod)

    if count < 0:
        count += mod * (-count // mod + 1)
    print(count % mod)


main()


### FIXED CODE ###

# from math import sqrt
# from heapq import heappush, heappop
# from collections import deque
from operator import mul
from functools import reduce
# a, b = [int(v) for v in input().split()]


def main():

    def modcmb(n, r, mod):
        if r < 0 or r > n:
            return 0
        r = min(r, n - r)
        over = 1
        under = 1
        for i in range(r):
            over = over * (n - i) % mod
            under = under * (i + 1) % mod

#        over = reduce(lambda v1, v2: (v1 * v2) % mod, range(n, n-r, -1))
#        under = reduce(lambda v1, v2: (v1 * v2) % mod, range(1, r+1))
        return (over * pow(under, mod - 2, mod)) % mod

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

    count = pow(2, n, mod) - 1
    count -= modcmb(n, a, mod)
    count -= modcmb(n, b, mod)

    while count < 0:
        count += mod
    print(count % mod)


main()
a = int(input())
b = list(map(int,input().split()))
ans = 0
while sum(b)%2 ==0:
  ans +=1
  b=[ i/2 for i in b]
print(ans)

### FIXED CODE ###

a = list(map(int,input()))
b= sum(a)
print(b)
import collections
import operator

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

D_dict = collections.Counter(D)
D_dict_sorted = sorted(D_dict.items(), key=operator.itemgetter(0))

if not D[0] != 0:
    ans = 1
    for i in range(int(max(D))):
        ans *= D_dict_sorted[i][1] ** D_dict_sorted[i+1][1]
else:
    ans = 0

print(ans % 998244353)

### FIXED CODE ###

import collections
import operator

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

D_dict = collections.Counter(D)
D_dict_sorted = sorted(D_dict.items(), key=operator.itemgetter(0))

# l = []
# for i in range(int(max(D))):
#     if D_dict_sorted[i][0] + 1 == D_dict_sorted[i+1][0]
#     l.append()

if (D[0] == 0) and (D_dict_sorted[0][1] == 1) :
    ans = 1
    for i in range(len(D_dict_sorted)-1):
        if D_dict_sorted[i][0] + 1 == D_dict_sorted[i+1][0]:
            ans *= D_dict_sorted[i][1] ** D_dict_sorted[i+1][1]
            if ans >= 998244353:
                ans = ans % 998244353
        else:
            ans = 0
else:
    ans = 0

print(ans)
N, M = [int(_) for _ in input().split()]
E = [[] for _ in range(N)]

indegree = [0] * N  # 入次数
for i in range(M):
    a, b = [int(_) - 1 for _ in input().split()]
    E[a].append(b)
    indegree[b] += 1

sorted_nodes = []
dp = [0] * N


def rep(v):
    """初めて呼ばれたときに, そのノードからの最長ノード数を数えるイメージ"""
    if dp[v] != 0: return dp[v]
    for n in E[v]:
        dp[v] = max(dp[v], rep(n) + 1)
    return dp[v]

ans = 0
for i in range(N):
    ans = max(ans,rep(i))
print(ans)




### FIXED CODE ###

from collections import deque

# deque
# https://docs.python.org/ja/3/library/collections.html#collections.deque
# pop(0), append が高速

# トポロジカルソート
# https://csacademy.com/lesson/topological_sorting/


N, M = [int(_) for _ in input().split()]
E = [[] for _ in range(N)]

indegree = [0] * N  # 入次数
for i in range(M):
    a, b = [int(_) - 1 for _ in input().split()]
    E[a].append(b)
    indegree[b] += 1

que = deque([i for i in range(N) if indegree[i] == 0])

sorted_nodes = []
dp = [0] * N
while que:
    n = que.popleft()
    sorted_nodes.append(n)
    for next_node in E[n]:
        indegree[next_node] = indegree[next_node] - 1  # 枝刈り
        if indegree[next_node] == 0:  # 入次数0なら queue に追加
            que.append(next_node)

        dp[next_node] = max(dp[next_node], dp[n] + 1)
# print(sorted_nodes)
print(max(dp))
import math

def triangle(a, b, deg):
    result = {}
    rad = math.radians(deg)    // 余弦定理
    c = math.sqrt(a*a+b*b-(2*a*b*math.cos(rad)))
    s = (a+b+c)/2
    result['area'] = math.sqrt(s*(s-a)*(s-b)*(s-c))
    result['perimeter'] = a+b+c
    result['height'] = result['area'] * 2 / a
    return result

if __name__ == '__main__':
    a, b, deg = map(int, input().split())
    triangle = triangle(a, b, deg)
    print(triangle['area'])
    print(triangle['perimeter'])
    print(triangle['height'])



### FIXED CODE ###

import math

def triangle(a, b, deg):
    result = {}
    rad = math.radians(deg)
    c = math.sqrt(a*a+b*b-(2*a*b*math.cos(rad)))
    s = (a+b+c)/2
    result['area'] = math.sqrt(s*(s-a)*(s-b)*(s-c))
    result['perimeter'] = a+b+c
    result['height'] = result['area'] * 2 / a
    return result

if __name__ == '__main__':
    a, b, deg = map(int, input().split())
    triangle = triangle(a, b, deg)
    print(triangle['area'])
    print(triangle['perimeter'])
    print(triangle['height'])
8 3

### FIXED CODE ###

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

print(t/x)
def manzoku(s):
    return sum([d for (t, d) in s]) + len(set([t for (t, d) in s]))**2

N, K = map(int, input().split())
menu = []

for i in range(N):
    t, d = map(int, input().split())
    menu.append((t, d))
#print(menu)
    
#Sort with value d
sorted(menu, key = lambda x:x[1], reverse=True)
#print(menu)

menu_ = menu[:K]
#print(menu_)
#x = len(set([t for (t, d) in menu_]))
_menu = menu[K:]
#print(_menu)

#print(menu_)
ans = manzoku(menu_)
flg = True
for idx in range(K, N):
    for j in range(K):
        if [i for (i, v) in menu_].count(menu_[j][0]) > 1:
            del menu_[j]
            #print(menu_)
            for k in range(N-K):
                if _menu[k][0] not in [i for (i, v) in menu_]:
                    menu_.append(_menu[k])
                    #print(menu_)
                    del _menu[k]
                    #print(_menu)
                    flg = False
                    break
        if flg == False:
            break

    p = manzoku(menu_)
    #print(ans, p)
    ans = max(ans, p)

print(ans)    

### FIXED CODE ###

N, K = map(int, input().split())
menu_ = []

for i in range(N):
    t, d = map(int, input().split())
    menu_.append((t, d))

menu = sorted(menu_, key = lambda x:x[1], reverse=True)
neta = set()
duplicates = []

for m in menu[:K]:
    if m[0] in neta:
        duplicates.append(m[1])
    else:
        neta.add(m[0])

p = sum([d for (t, d) in menu[:K]]) + len(neta)**2
ans = p

for m in menu[K:]:
    if m[0] not in neta and duplicates:
        neta.add(m[0])
        duplicate = duplicates.pop()
        
        p += (m[1] - duplicate) + 2 * len(neta) - 1 
        #print(ans, p)
        ans = max(ans, p)

print(ans)
hn_kz={1:2,2:5,3:5,4:4,5:5,6:6,7:3,8:7,9:6}
kz_hn={}
n,m,*kzs=map(int,open(0).read().split())
#本数から数を求める辞書を作る。同じ本数の数は大きい方を取る
for kz in kzs:
    ah=hn_kz[kz]
    if ah in kz_hn:
        kz_hn[ah]=max(kz_hn[ah],kz)
    else:
        kz_hn[ah]=kz
#最小の本数をhmnに格納
hmn=min(kz_hn.keys())
#まず、最小の本数の数だけで桁[本数]の辞書を作る
kt_hn={kt*hmn:kt for kt in range(n//hmn+1)}
#最小本数以外の数の辞書nkz_hnを作る
nkz_hn=kz_hn.copy()
del nkz_hn[hmn]
#本数から桁数を求める関数
inf=100
def keta(hn):
    if hn in kt_hn:
        return kt_hn[hn]
    elif hn<0:
        return -inf
    else:
        maxketa=-inf
        for hni in nkz_hn.keys():
            newkt=keta(hn-hni)+1
            if newkt>maxketa:
                maxketa=newkt
        kt_hn[hn]=maxketa
        return maxketa
#目的の数を作る
ans=""
nokori=n
while nokori>0:
    for kh in sorted(kz_hn.items(),key=lambda xkh:xkh[1],reverse=True):
        if keta(nokori-kh[0])==keta(nokori)-1:
            ans+=str(kh[1])
            nokori-=kh[0]
            break
print(ans)

### FIXED CODE ###

def smax(s1, s2):
    if s1=="N":
        if s2[0]=="N":
            return "N"
        else:
            return s2
    if s2[0] == "N":
        return s1
    l1 = len(s1)
    l2 = len(s2)
    if l1 == l2:
        return max(s1, s2)
    if l1 > l2:
        return s1
    return s2

hon = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]
n, m = map(int, input().split())
aa = list(map(int, input().split()))
dp = ["N"] * (n + 1)
dp[0]=""
for i in range(2, n + 1):
    for a in aa:
        if i - hon[a] < 0: continue
        dp[i] = smax(dp[i], dp[i - hon[a]] + str(a))
print(dp[-1])
import sys
from collections import deque  # 双方向キュー
from collections import defaultdict  # 初期化済み辞書
from heapq import heapify, heappush, heappop, heappushpop  # プライオリティキュー
from bisect import bisect_left, bisect_right  # 二分探索
#import numpy as np  # 1.8.2
#import scipy  # 0.13.3

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in ss]
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    N = i2n()
    xy = ii2nnn(N)
    dicx = defaultdict(lambda: 0)
    xy.sort(key=lambda v: v[1])
    xy.sort(key=lambda v: v[0])
    for i in range(1, len(xy)):
        dx = xy[i][0] - xy[i-1][0]
        dy = xy[i][1] - xy[i-1][1]
        if dx == 0 and dy == 0:
            continue
        key = '%d %d' % (dx, dy)
        dicx[key] += 1
    dicy = defaultdict(lambda: 0)
    xy.sort(key=lambda v: v[1])
    for i in range(1, len(xy)):
        dx = xy[i][0] - xy[i-1][0]
        dy = xy[i][1] - xy[i-1][1]
        if dx == 0 and dy == 0:
            continue
        key = '%d %d' % (dx, dy)
        dicy[key] += 1
    nm = 0
    for v in dicx.values():
        if nm < v:
            nm = v
    for v in dicy.values():
        if nm < v:
            nm = v
    print(N - nm)

main()


### FIXED CODE ###

import sys
from collections import deque  # 双方向キュー
from collections import defaultdict  # 初期化済み辞書
from heapq import heapify, heappush, heappop, heappushpop  # プライオリティキュー
from bisect import bisect_left, bisect_right  # 二分探索
#import numpy as np  # 1.8.2
#import scipy  # 0.13.3

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in ss]
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    N = i2n()
    A = i2nn()
    A.sort()
    a0 = A[0]
    a3 = A[N-1]
    A12 = A[1:N-1]
    iz = bisect_left(A12, 0)
    A1 = A12[:iz]
    A2 = A12[iz:]

    logs = []
    def logging(x, y):
        logs.append('%d %d' % (x, y))
        return x - y
    x = a0
    for y in A2:
        x = logging(x, y)
    y = x
    x = a3
    x = logging(x, y)
    for y in A1:
        x = logging(x, y)
    print(x)
    for log in logs:
        print(log)

main()
data = [int(input()) for i in range(6)]
print('Yay!' if data[-2] - data[0] =< data[-1] else ':(')


### FIXED CODE ###

data = [int(input()) for i in range(6)]
print('Yay!' if data[-2] - data[0] <= data[-1] else ':(')
print(max(0,eval('-'+input().replace(' ','+')))

### FIXED CODE ###

print(max(0,eval('-'+input().replace(' ','+'))))
m,n = int(input().split())
print((m-1)*(n-1))

### FIXED CODE ###

m,n = map(int, input().split())
print((m-1)*(n-1))
N = int(input())
L = list(map(int, input().split()))
if N == 1:
  print(0)
else:
  x = 0
  for i in range(0,len(L)-1):
    if L[i] > L[i + 1]:
      x = x + (L[i] - L[i + 1])
      L[i + 1] = L[i + 1] + (L[i] - L[i + 1])
print(x)
    



### FIXED CODE ###

import sys
input = sys.stdin.readline
N = int(input())
L = list(map(int, input().split()))
if N == 1:
  print(0)
else:
  x = 0
  for i in range(0,len(L)-1):
    if L[i] > L[i + 1]:
      x = x + (L[i] - L[i + 1])
      L[i + 1] = L[i + 1] + (L[i] - L[i + 1])
  print(x)
# coding: utf-8
# Your code here!

import collections

n=int(input())
x=[]
y=[]
for _ in range(n):
    x0,y0 = [int(i) for i in input().split()]
    x.append(x0)
    y.append(y0)

a = [(x[i]+y[i])%2 for i in range(n)]
#print(a)
if max(a) != min(a):
    print(-1)
else:
    p=max(a)
    c=40-p
    print(c)
    print(*([1]*c))
    for i in range(n):
        ans=[]
        if x[i]<0:
            ans=ans+["L"]*abs(x[i])
        else:
            ans=ans+["R"]*abs(x[i])
        
        l=c-len(ans)
        UU=(l+y[i])//2
        ans=ans+["U"]*UU+["D"]*(l-UU)
        print(''.join(ans))







### FIXED CODE ###

# coding: utf-8
# Your code here!

import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
 
n = int(input())
xy = [[int(i) for i in readline().split()] for _ in range(n)]

p = sum(xy[0])%2
for x,y in xy:
    if p != (x+y)%2:
        print(-1)
        exit()

d = [2**i for i in range(38,-1,-1)]
if not p: d += [1]

print(len(d))
print(*d)

for x,y in xy:
    ans = []
    xx = yy = 0
    for di in d:
        dx = x-xx
        dy = y-yy
        if dy > dx:
            if dy > -dx:
                ans.append("U")
                yy += di
            else:
                ans.append("L")
                xx -= di
        else:
            if -dy > dx:
                ans.append("D")
                yy -= di
            else:
                ans.append("R")
                xx += di
    print("".join(ans))
count=0
a=0
n,x = map(int,input().split())
li = list(map(int,input().split()))
for i in range(n):
    if (a<=x):
        a=a+li[i]
        count+=1
print(count)

### FIXED CODE ###

x,y = map(int,input().split())
if x<y:
	print(0)
else:
	print(10)
S = int(input())
 
if 1 <= S[2:4] <= 12 and 1 <= S[0:2] <= 12:
    print('AMBIGUOUS') 
elif 1 <= S[2:4] <= 12:
    print('YYMM')
elif 1 <= S[0:2] <= 12:
    print('MMYY')
else:
    print('NA')

### 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')
a=input()
b=input()
c=len(a)
d=len(b)
x=""
if c<=d:
  for i in range(c):
    x=x+c[i]
    x=x+d[i]
  print(x)
if c>d:
  for i in range(d):
    x=x+c[i]
    x=x+d[i]
  x=x+c[len(a)-1]
  print(x)

### FIXED CODE ###

a=input()
b=input()
c=len(a)
d=len(b)
x=""
if c<=d:
  for i in range(c):
    x=x+a[i]
    x=x+b[i]
  print(x)
if c>d:
  for i in range(d):
    x=x+a[i]
    x=x+b[i]
  x=x+a[len(a)-1]
  print(x)
X,Y,A,B,C = map(int,input().split())
p = list(map(int,input().split()))
q = list(map(int,input().split()))
r = list(map(int,input().split()))
p = sorted(p)
q = sorted(q)
r = sorted(r)
P = A - X
Q = B - Y
R = C - 1
found = True
for i in range(C+1):
    if R < 0:
        break
    if P < A:
        if (r[C-i-1] >= p[P]):
            if (q[Q] >= p[P]):
                P += 1
                R -= 1
            elif Q < B:
                if r[C-i-1] > q[Q]:
                    Q += 1
                    R -= 1
                else:
                    break
            else:
                break
        elif Q < B:
            if r[C-i-1] > q[Q]:
                Q += 1
                R -= 1
            else:
                break
        else:
    elif Q < B:
        if r[C-i-1] > q[Q]:
                Q += 1
                R -= 1
        else:
            break    
    else:
        break
print(sum(p[P:])+sum(q[Q:])+sum(r[R+1:]))

### FIXED CODE ###

S = input()
found = False
if S[2] == S[3] and S[4] == S[5]:
    found = True
if found:
    print('Yes')
else:
    print('No')
li = list(input())

flag = 'No'
for i in range(1,4):
    if li[0]==li[i]:
        del li[i],li[0]
        if li[0] == li[1]:
            flag = 'Yes'
            break

print(flag)

### FIXED CODE ###

li = list(input())
li1 = li[:]

flag = 'No'
for i in range(1,4):
    if li[0]==li[i]:
        del li1[i],li1[0]
        if li1[0] == li1[1]:
            flag = 'Yes'
            break
        break
if li[0]==li1[0]:
    flag = 'No'

print(flag)