Harryxun/stf_run huggingface dataset:
n,m=map(int,input().split())
e=[]
for i in range(n):
    e.append(list(map(int,input().split())))
ans=0
for i in range(m):
    nall=[]
    for j in range(m):
        if i==j:
            continue
        nall.append(e[j])
    visited=[0]*n
    t=[1]
    while len(t)>0:
        tmp=[]
        ntmp=[]
        for p in t:
            visited[p-1]=1
            for q in nall:
                if q[0]==p:
                    if visited[q[1]-1]==0:
                        tmp.append(q[1])
                        visited[q[1]-1]=1
                elif q[1]==p:
                    if visited[q[0]-1]==0:
                        tmp.append(q[0])
                        visited[q[0]-1]=1
                else:
                    ntmp.append(q)
        t=tmp
        nall=ntmp
    if sum(visited)!=n:
        ans+=1
print(ans)
                    

### FIXED CODE ###

n,m=map(int,input().split())
e=[]
for i in range(m):
    e.append(list(map(int,input().split())))
ans=0
for i in range(m):
    g=[[] for _ in range(n)]
    for j in range(m):
        if i==j:
            continue
        g[e[j][0]-1].append(e[j][1])
        g[e[j][1]-1].append(e[j][0])
    visited=[0]*n
    visited[0]=1
    q=[1]
    while len(q)>0:
        a=q.pop(0)
        visited[a-1]=1
        for k in g[a-1]:
            if visited[k-1]==0:
                q+=[k]
    if sum(visited)!=n:
        ans+=1
print(ans)
N = int(input())
A = list(map(int, input().split()))
ans = 1
if N % 2 == 0:
    
    for i in list(range(1, N, 2)):
        if A.count(i) != 2:
            ans = 0
            break
            
else:
    if A.count(0) == 1:
        for i in list(range(2, N, 2)):
            if A.count(i) != 2:
                ans = 0
                break
    else:
        ans = 0

if ans == 0:
    print(0)
else:
    print((2**(N//2))%(10**9+7))

### FIXED CODE ###

sx,sy,tx,ty=map(int,input().split())
dx=tx-sx
dy=ty-sy
 
a="U"*dy+"R"*dx
b="D"*dy+"L"*dx
c="L"+"U"*(dy+1)+"R"*(dx+1)+"D"
d="R"+"D"*(dy+1)+"L"*(dx+1)+"U"
print(a+b+c+d)
n,a,b=map(int,input().split())
if (a-b)%2==0:
 print((b-a)/2))
else:
 print(min(int((2*(a-1)+b-a+1)/2),int((2*(n-b)+b-a+1)/2)))

### FIXED CODE ###

N,A,B=map(int,input().split())
if (B-A)%2==0:
 print((B-A)//2)
else:
 print(min((A+B-1)//2,(2*N-A-B+1)//2))
A,B,C=map.(int,input().split())
if A+B==10 or A+B==12:
  if A+C==10 or A+C==12:
    if B+C==10 or B+C==12:
      print("YES")
    else:
      print("NO")

### FIXED CODE ###

M=list(map(int,input().split()))
if M.count(5)==2 and M.count(7)==1:
  print("YES")
else:
  print("NO")
N, M=map(int,input().split())
if M==0:
	print("0 0")
else:
	A=[]
	for i in range(M):
		a=list(map(str,input().split()))
		A.append(a)
	ch=[]
	ac=0
	pe=0
	for i in range(M):
		if A[i][0] in ch:
			continue
		elif A[i][1]=="AC":
			ch.append(A[i][0])
			ac+=1
		else:
			pe+=1
	print(ac,pe)

### FIXED CODE ###

C=input()
print(chr(ord(C)+1))
import sys
t='X'
for e in sys.stdin:
 for i in'0123456789'[(e[0]==t)*(e[1]!='+')or('+X'in e)*('+X='not in e)or('=X'in e)*(e[-1]==t):]:
  if eval(e.replace(t,i).replace('=','==')):print(i);break
 else:print('NA')


### FIXED CODE ###

import sys
p,t='+X'
for e in sys.stdin:
 for i in'0123456789'[(e[0]==t)*(e[1]!=p)or('+X'in e)*('+X='not in e):]:
  l,r=e.replace(t,i).split('=')
  if sum(map(int,l.split(p)))==int(r):print(i);break
 else:print('NA')
import sys

class Deque:
    class Cell2:
        def __init__(self, x, y = None, z = None):
            self.data = x
            self.next = y
            self.prev = z

    def __init__(self):
        head = Deque.Cell2(None)
        head.next = head        
        head.prev = head
        self.size = 0
        self.head = head

    def push_front(self, x):
        h = self.head
        q = h.next
        p = Deque.Cell2(x, q, h)
        h.next = p
        q.prev = p
        self.size += 1

    def pop_back(self):
        if self.size == 0: raise IndexError
        h = self.head
        q = h.prev
        p = q.prev
        p.next = h
        h.prev = p
        self.size -= 1
        return q.data

    # 先頭のデータを取り出す
    def pop_front(self):
        if self.size == 0: raise IndexError
        h = self.head
        q = h.next
        p = q.next
        p.prev = h
        h.next = p
        self.size -= 1
        del gc.garbage[:]
        return q.data

    # xをもつセルを削除する
    def delete(self,x):
        h=self.head.next
        while h.data!=x:
            h=h.next
            if h==self.head: return
        q=h.next
        p=h.prev
        q.prev=p
        p.next=q
        self.size -= 1
        del gc.garbage[:]
        return

    # 表示
    def __str__(self):
        if self.size == 0: return
        buff = ''
        n = self.size
        cp = self.head.next
        while n > 1:
            buff += '%s ' % cp.data
            cp = cp.next
            n -= 1
        buff += '%s' % cp.data
        return buff
    
A=Deque()
n=int(raw_input())
while n:
    s = (raw_input().split())
    if s[0] == 'insert':
        A.push_front(int(s[1]))
    elif s[0] == 'delete':
        A.delete(int(s[1]))
    elif s[0] == 'deleteFirst':
        A.pop_front()
    elif s[0] == 'deleteLast':
        A.pop_back()
    n -=1
    
    print A
    print

### FIXED CODE ###

import sys,gc
    
A=[]
fp =0
bp =0

n=int(raw_input())
while n:
    s = raw_input()
    if s[0] == 'i':
        A.append(int(s[7:]))
        fp += 1
    elif s[6] == ' ':
        try:
            i = A[::-1].index(int(s[7:]))
            if i!=-1:
                del A[-i-1]
                fp -=1
        except:
            pass
    elif s[6] == 'F':
        A.pop()
        fp -=1
    elif s[6] == 'L':
        bp +=1
    n -=1

for e in A[bp:fp+1][::-1]:
    print int(e),
import collections
N = int(input())
x = []
for i in range(N):
	x.append(list(map(int, input().split())))
if N == 1
	print(1)
else:
	L = []
	for i in range(N):
		a, b = x[i][0], x[i][1]
		for j in range(N):
			if a > x[j][0] or b > x[j][1]:
				L.append((a - x[j][0], b - x[j][1]))
	c = collections.Counter(L)
	max = c.most_common(1)[0][1]
	print(N - max)

### FIXED CODE ###

import collections
N = int(input())
x = []
for i in range(N):
	x.append(list(map(int, input().split())))
if N == 1:
	print(1)
else:
	L = []
	for i in range(N):
		a, b = x[i][0], x[i][1]
		for j in range(N):
			if a > x[j][0] or b > x[j][1]:
				L.append((a - x[j][0], b - x[j][1]))
	c = collections.Counter(L)
	max = c.most_common(1)[0][1]
	print(N - max)
n = int(input())
print(x^1)

### FIXED CODE ###

x = int(input())
print(x^1)
n=int(input())
lst=list(map(int,input().split()))

for i in range(0,n):
    if lst[i]%2==0:
        if lst[i]%3==0 or lst[i]%5==0:
            x=1
            
        else: x=0
if x==1:print("APPROVED")
else: print("DENIED")

### FIXED CODE ###

n=int(input())
check=list(map(int,input().split()))
f=0
for i in range(n):
    if check[i]%2==0:
        if check[i]%3!=0 and check[i]%5!=0:
            f=1
                
if f==1:
    print("DENIED")
else:
    print("APPROVED")
a,b,x = map(int,input().split())

ans = 0
for i in range(a,b+1):
  if i % x==0 :ans. +=1
    
print(ans)

### FIXED CODE ###

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


ans = b//x - (a-1)//x
print(ans)
n, k = map(int, input().split())
a = list(map(int, input().split()))

for i in range(n-k):
    if a[i+k] > a[i]:
        print('Yes')
    else:
        print('No')


### FIXED CODE ###

# cook your dish here
a,b,c = map(int, input().split())
k = int(input())
c1, c2 = 0, 0
while b<=a:
    b=b*2
    c1 = c1 + 1
while c <= b:
    c=c*2
    c2 = c2 +1
if c1 + c2 <= k:
    print('Yes')
else:
    print('No')
from collections import deque
from copy import copy
from copy import deepcopy

def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a

def gcd_of_array(_array):
    _array_copy = _array.copy()
    array_of_gcd = deque([])
    n = len(_array_copy)
    if n == 1:
        return _array[0]
    if n % 2 == 1:
        a = _array_copy.pop()
        array_of_gcd.append(a)
    for i in range(0,N-1,2):
        array_of_gcd.append(gcd(_array_copy.pop(),_array_copy.pop()))

    return gcd_of_array(array_of_gcd)

    
N = int(input())
A = deque(list(map(int, input().split())))

gcd_max=1

for i in range(N):
    a = A.popleft()
    gcd_max = max(gcd_max, gcd_of_array(A))
    A.append(a)

print(gcd_max)


### FIXED CODE ###

from collections import deque
from copy import copy
from array import array

def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a

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

def get_prefix_gcd_list(Adeque):
    prefix_gcd = array('i', [0]*N)
    # marker
    prefix_gcd[0] = 0
    # the first itself is gcd
    prefix_gcd[1] = Adeque.popleft()
    for i in range(2,N):
        a = Adeque.popleft()
        prefix_gcd[i] = gcd(prefix_gcd[i-1], a)
        pass
    return prefix_gcd
        
    
# PREFIX_GCD[i]...i より前の要素のGCD
PREFIX_GCD = get_prefix_gcd_list(deque(copy(A)))

# PREFIX_GCD[i]...i より後の要素のGCD
POSTFIX_GCD=list(reversed(get_prefix_gcd_list(deque(reversed(A)))))

gcd_max=1

for i in range(N):
    pre = PREFIX_GCD[i]
    pos = POSTFIX_GCD[i]
    if pre == 0:
        _gcd = pos
    elif pos == 0:
        _gcd = pre
    else:
        _gcd = gcd(pre,pos)
    gcd_max = max(gcd_max, _gcd)
        
print(gcd_max)
from collections import deque
n = input()
k = int(input())
a = [int(n[i]) for i in range(min(k, len(n)))]
n = len(n)

if k > n:
    ans = 0
elif k == 1:
    # n 桁目に非負整数
    ans += a[0]
    # n 桁目以外に非負整数
    ans += (n - 1)*9
elif k == 2:
    # 上と同様
    ans += a[1] + (n - 2)*9
    # n 桁目の最大ではない非負整数と n-1 桁目以降に 1 つ非負整数
    ans += (a[0] - 1)*(n - 1)*9
    # n-1 桁目以降の中から 2 つ非負整数
    ans += (n - 1)*(n - 2)*9*9//2
else:
    # 上と同様
    ans += a[2] + (n - 3)*9 + (n - 2)*(n - 3)*9*9//2
    if a[1] != 0:
        ans += (a[1] - 1)*(n - 2)*9
    # n 桁目の最大でない非負整数と n-1 桁目以降に 2 つ非負整数
    ans += (a[0] - 1)*(n - 1)*(n - 2)*9*9//2
    # n-1 桁目以降から 3 つ非負整数
    ans += (n - 1)*(n - 2)*(n - 3)*9*9*9//6
print(ans)

### FIXED CODE ###

from collections import deque
n = input()
a = [int(i) for i in list(n)]
k = int(input())
n = len(n)
ans = 0

if k > n:
    ans = 0
elif k == 1:
    # n 桁目に非負整数
    ans += a[0]
    # n 桁目以外に非負整数
    ans += (n - 1)*9
elif k == 2:
    # 上と同様
    for i in range(1, n):
        if a[i] != 0:
            j = i
            break
    else:
        j = n - 1
    ans += a[j] + (n - j - 1)*9
    # n 桁目の最大ではない非負整数と n-1 桁目以降に 1 つ非負整数
    ans += (a[0] - 1)*(n - 1)*9
    # n-1 桁目以降の中から 2 つ非負整数
    ans += (n - 1)*(n - 2)*9*9//2
else:
    # 上と同様
    j, l= -1, n - 1
    for i in range(1, n):
        if a[i] != 0:
            if j == -1:
                j = i
            else:
                l = i
                break
    if j != -1 and j != n - 1:
        ans += a[l] + (n - l - 1)*9 + (a[j] - 1)*(n - j - 1)*9 + (n - j - 1)*(n - j - 2)*9*9//2
    # n 桁目の最大でない非負整数と n-1 桁目以降に 2 つ非負整数
    ans += (a[0] - 1)*(n - 1)*(n - 2)*9*9//2
    # n-1 桁目以降から 3 つ非負整数
    ans += (n - 1)*(n - 2)*(n - 3)*9*9*9//6
print(ans)
H,W,x,y,r = map(int,input().split())

if -r < = y <= H-r :
  if -r < =  x <= W-r :
    print('Yes')
else :
  print('No')


### FIXED CODE ###

W,H,x,y,r = map(int,input().split())

if (r <= y and y <= H-r) :
  if (r <= x and x <= W-r ):
    print('Yes')
  else :
    print('No')
else :
  print('No')
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF = 10**20
def main():
    N,M,K=mi()
    A=[0]+list(mi())
    B=[0]+list(mi())

    v = [0]*(N+1)
    u = [0]*(M+1)

    for i in range(N):
        v[i+1] = A[i+1] + v[i]
        
    for i in range(M):
        u[i+1] = B[i+1] + u[i]

    # print(u,v)
    ans = 0
    for i in range(M+1):
        if K-u[i] < 0: continue
        j = bisect.bisect_left(v,K-u[i])

        if j == 0 and K-u[i] < A[0]: continue
        
        if j<len(v) and v[j] != K-u[i]:
            j -= 1
        
            
        ans = max(ans,i+j)

    print(ans)



if __name__ == "__main__":
    main()


### FIXED CODE ###

import bisect
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF = 10**20
def main():
    N,M,K=mi()
    A=[0]+list(mi())
    B=[0]+list(mi())

    v = [0]*(N+1)
    u = [0]*(M+1)

    for i in range(N):
        v[i+1] = A[i+1] + v[i]
        
    for i in range(M):
        u[i+1] = B[i+1] + u[i]

    # print(u,v)
    ans = 0
    for i in range(M+1):
        if K-u[i] < 0: continue
        j = bisect.bisect_left(v,K-u[i])

        if j == 0 and K-u[i] < A[0]: continue

        if j<len(v) and v[j] != K-u[i]:
            j -= 1
        
            
        ans = max(ans,i+j)

    print(ans)



if __name__ == "__main__":
    main()
#c welcome to atcoder
import sys
n,m=map(int,input().split())
ps=[]
num={}
#辞書
ac=0
pena=0
if m==0:
    print('0 0')
    sys.exit()
for i in range(m):
    result=input().split()
    ps.append(result)

for x in ps:
    print(x[0])
    if x[0] not in num:
        num[x[0]]=0
    print(num[x[0]])
    if x[1]=="WA" and num[x[0]]==0:
        pena+=1
    if x[1]=="AC" and num[x[0]]==0:
        ac+=1
        num[x[0]]=1

print(num)

print(ac,pena)

### FIXED CODE ###

#a 
c=input()
ans=ord(c)+1
print(chr(ans))
s = input()
l = list('abcdefghijklmnopqrstuvwxyz')
for s_ in s:
    l.remove(s_)
print(s+l[0])

### FIXED CODE ###

s = input()
l = list('abcdefghijklmnopqrstuvwxyz')
for s_ in s:
    l.remove(s_)
if l==[]:
    l.append(s[-1])
    for i in range(len(s)-2,-1,-1):
        if s[i]<max(l):
            for k in l:
                if k>s[i]:
                    print(s[:i]+k)
                    exit()
        l.append(s[i])
    print(-1)
else:
    print(s+l[0])
a,b,c = map(int,input().split())
cnt=0
if a==b==c and a%2==0:
    cnt = -1
    break
elif:
    for i in range(100):
        if a%2==0 and b%2==0 and c%2==10:
            t_a = b//2 + c//2
            t_b = a//2 + c//2
            t_c = a//2 + b//2
            a,b,c = t_a,t_b,t_c
            cnt+=1
        else:
            break
print(cnt)

### FIXED CODE ###

a,b,c = map(int,input().split())
cnt=0
if a==b==c and a%2==0:
    cnt = -1
else:
    for i in range(100):
        if a%2==0 and b%2==0 and c%2==0:
            t_a = b//2 + c//2
            t_b = a//2 + c//2
            t_c = a//2 + b//2
            a,b,c = t_a,t_b,t_c
            cnt+=1
        else:
            break
print(cnt)
def solve(lines):
    N = int(lines.pop(0))
    print(math.ceil(N/2))
solve(lines)

### FIXED CODE ###

import sys,math
N = int(input())
print(math.ceil(N/2))
from collections import deque
s=input()
Q=int(input())

ans=deque()
ans.append(s)
rev=False

for _ in range(Q):
    query=input().split()
    if query[0]=="1":
        rev = not rev
    else:
        if rev:
            query[1]=str(3-int(query[1]))
        if query[1]=="1":
            ans.appendleft(query[2])
        else:
            ans.append(query[2])

if not rev:
    for si in ans:
        print(si,end="")
else:
    for i in range(len(ans),0,-1):
        print(ans[i],end="")

### FIXED CODE ###

S=input()
Q=int(input())

# deq=deque()
# for s in S:
#     deq.append(s)

rev=False
front=""
last=""
# ans+=S

for _ in range(Q):
    query=input().split()
    if query[0]=="1":
        rev = not rev
        # print(rev)
    else:
        if rev:
            query[1]=str(3-int(query[1]))
        if query[1]=="1":
            # deq.appendleft(query[2])
            front=query[2]+front
        else:
            # deq.append(query[2])
            last+=query[2]

# if rev:
#     deq.reverse()
# # ans=""
# for i in range(len(deq)):
#     ans+=deq[i]

if not rev:
    print(front+S+last)
else:
    print(last[::-1]+S[::-1]+front[::-1])
A, B, K = map(int, input().split())
s = []
for i in range(100):
  if A%i==0 and B%i==0:
    s.append(i)
print(s[K-1])

### FIXED CODE ###

A, B, K = map(int, input().split())
s = []
for i in range(1, 101):
    if A%i==0 and B%i==0:
        s.append(i)
print(s[len(s)-K])
import sys
def main():
    H1, M1, H2, M2, K = map(int, input().split())
    
    h = H2 - H1 
    m = M2 - M1
    tot_minutes = h * 60 + m - K
    if tot_minutes <= 0:
        out = 0
    print(out)
main()

### FIXED CODE ###

import sys
def main():
    H1, M1, H2, M2, K = map(int, input().split())
    
    h = H2 - H1 
    m = M2 - M1
    tot_minutes = h * 60 + m - K
    
    if tot_minutes <= 0:
        out = 0
    else:
        out = tot_minutes
    print(out)
main()
r = int(input())
pi = 3.1415926535
print("%.8f %.8f" % (pi*r*r, 2*pi*r))

### FIXED CODE ###

r = float(input())
pi = 3.14159265358979323846264338
print("%.7f %.7f" % (pi*r*r, 2*pi*r))
N = int(input())
for i in N:
  sum += i
if sum % N == 0:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

N = input()
sum = 0
for i in N:
  sum += int(i)
if int(N) % sum == 0:
  print('Yes')
else:
  print('No')
class UnionFind:
    def __init__(self, size):
        self.table = [-1 for _ in range(size)]

    def find(self, x):
        if self.table[x] < 0:
            return x
        else:
            self.table[x] = self.find(self.table[x])
            return self.table[x]

    def union(self, x, y):
        s1 = self.find(x)
        s2 = self.find(y)
        if s1 != s2:
            if self.table[s1] <= self.table[s2]:
                self.table[s1] += self.table[s2]
                self.table[s2] = s1
            else:
                self.table[s2] += self.table[s1]
                self.table[s1] = s2
            return True
        return False

def cal(d,xl):
    N=len(xl)
    for i in range(N-1):
        r1=abs(xl[i+1][0]-xl[i][0])
        try:
            l=d[r1]
            l.append([xl[i+1][1],xl[i][1]])
            d[r1]=l
        except:
            d[r1]=[[xl[i+1][1],xl[i][1]]]
    return d
N=int(input())
N=10**5
x=[[0,0] for _ in range(N)]
y=[[0,0] for _ in range(N)]
for i in range(N):
    x[i][0],y[i][0]=list(map(int,input().split()))
    x[i][1],y[i][1]=i,i
x=sorted(x,key=lambda l: l[0])
y=sorted(y,key=lambda l: l[0])
a=cal(cal({},x),y)
p=UnionFind(N)
c=0
cost=0
edgecount=0
while True:
    if(edgecount==N-1):
        print(cost)
        break
    try:
        l=a[c]
        for item in l:
            if(p.union(item[0],item[1])):
                cost+=c
                edgecount+=1
            
        c+=1
    except:
        c+=1
        continue

### FIXED CODE ###

class UnionFind:
    def __init__(self, size):
        self.table = [-1 for _ in range(size)]
 
    def find(self, x):
        if self.table[x] < 0:
            return x
        else:
            self.table[x] = self.find(self.table[x])
            return self.table[x]
 
    def union(self, x, y):
        s1 = self.find(x)
        s2 = self.find(y)
        if s1 != s2:
            if self.table[s1] <= self.table[s2]:
                self.table[s1] += self.table[s2]
                self.table[s2] = s1
            else:
                self.table[s2] += self.table[s1]
                self.table[s1] = s2
            return True
        return False
 
def cal(d,xl):
    N=len(xl)
    for i in range(N-1):
        r1=abs(xl[i+1][0]-xl[i][0])
        try:
            l=d[r1]
            l.append([xl[i+1][1],xl[i][1]])
            d[r1]=l
        except:
            d[r1]=[[xl[i+1][1],xl[i][1]]]
    return d
N=int(input())
x=[[0,0] for _ in range(N)]
y=[[0,0] for _ in range(N)]
for i in range(N):
    x[i][0],y[i][0]=list(map(int,input().split()))
    x[i][1],y[i][1]=i,i
x=sorted(x,key=lambda l: l[0])
y=sorted(y,key=lambda l: l[0])
a=cal(cal({},x),y)
p=UnionFind(N)
c=0
cost=0
edgecount=0
while True:
    if(edgecount==N-1):
        print(cost)
        break
    try:
        l=a[c]
        for item in l:
            if(p.union(item[0],item[1])):
                cost+=c
                edgecount+=1
            
        c+=1
    except:
        c+=1
        continue
a,b,c,k = map(int,input().split())

s = [1] * a + [0] * b + [-1] * c
print(sum(s[:k]))


### FIXED CODE ###

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

if a + b >= k:
  print(min(a,k))
else:
  print(a - (k - a - b))
S = input()
S = list(S)
S.append("a")
hoge = "Good"
for i in range(4):
    if hoge[i] == hoge[i + 1]:
        hoge = "Bad"

print(hoge)

### FIXED CODE ###

S = input()
S = list(S)
S.append("a")
hoge = "Good"
for i in range(4):
    if S[i] == S[i + 1]:
        hoge = "Bad"

print(hoge)
o = list(input())
e = list(input())
e_ni = e.append('a')
l = []
if len(o) == len(e):
  for i in range (len(o)):
  a = o[i]
  b = e[i]
  l.append(a)
  l.append(b)
else:
  for i in range (len(o)):
  a = o[i]
  b = e[i]
  l.append(a)
  l.append(b)
  del l[-1]
s = ''.join(l)
print(s)


### FIXED CODE ###

o = list(input())
e = list(input())
i = 0
ans = ""
while i < len(e):
  ans += o[i]+e[i]
  i += 1
if len(o) > len(e):
  ans += o[len(o)-1]
print(ans)
y, m, d = map(int, input().split('/'))
print(y, m, def)
if m <= 4:
    print("Heisei")
else:
    print("TBD")

### FIXED CODE ###

y, m, d = map(int, input().split('/'))
if m <= 4:
    print("Heisei")
else:
    print("TBD")
n = int(input())
xu = [list(map(int,input().split())) for i in range(n)]
sigma = 0

for j in range(n):
  if xu[j][1] == "BTC":
    sigma = sigma + xu[j][0]*380000
  else:
    sigma = sigma + xu[j][0]
    
print(sigma)

### FIXED CODE ###

n = int(input())
xu = [list(input().split()) for i in range(n)]
sigma = 0

for j in range(n):
  if xu[j][1] == "BTC":
    sigma = sigma + float(xu[j][0])*380000
  else:
    sigma = sigma + float(xu[j][0])
    
print(sigma)
#ナップザック問題
import numpy as np

N = int(input())  
wv = np.array([list(map(int, input().split())) for i in range(0, N)])  
W = int(input()) 

dp=np.zeros((N+1,W+1),dtype=int)
for n in range(0, N):  
    for w in range(0, W + 1):  
        if w < wv[n, 0]:  
            dp[n+1, w] = dp[n, w]  
        else:  
            dp[n+1, w] = max(dp[n, w], dp[n, w - wv[n, 0]] + wv[n, 1])  
print(dp[N,W])  

### FIXED CODE ###

N,W=map(int,input().split())
DP=[[0 for j in range(W+1)]for i in range(N+1)]
for i in range(N):
    w,v=map(int,input().split())
    for j in range(1,W+1):
        if j>=w:
            DP[i+1][j]=max(DP[i][j-w]+v,DP[i][j])
        else:
            DP[i+1][j]=DP[i][j]
print(DP[N][W])
n = input()
l = input().split()
cnt = 0
while len([True for x in l if x%2==0]):
  l = [x/2 for x in l]
  cnt += 1
print(cnt)

### FIXED CODE ###

n = input()
l = [int(x) for x in input().split()]
cnt = 0
while len([True for x in l if x%2==0]) == len(l):
  l = [x/2 for x in l]
  cnt += 1
print(cnt)
#標準入力
X = int(input())

max_beki = 1
for i in range(1,X/2):
  for j in range(2,X/2):
    beki = i %% j
    
    if beki > max_beki:
      if beki <= X:
        max_beki = beki
      
print(max_beki)


### FIXED CODE ###

#標準入力
X = int(input())

max_beki = 1
for i in range(1,X):
  for j in range(2,X):
    beki = i ** j
    
    if beki > X:
      break
      
    elif beki > max_beki:
      max_beki = beki
 
print(max_beki)
import numpy as np
import sys
H, W, M = map(int, input().split())
d = np.zeros((H, W), dtype=np.int64)
for _ in range(M):
    h, w = map(int, input().split())
    #d[h-1, w-1] = 1

print(1)
exit()
tate = np.sum(d, axis=0)
yoko = np.sum(d, axis=1)
tate_max = tate.max()
yoko_max = yoko.max()

ans_tate, ans_yoko = [], []

for i in range(W):
    if tate[i] == tate_max:
        ans_tate.append(i)

for i in range(H):
    if yoko[i] == yoko_max:
        ans_yoko.append(i)

for h in ans_yoko:
    for w in ans_tate:
        if not d[h, w]:
            print(tate_max+yoko_max)
            sys.exit()
print(tate_max+yoko_max-1)

### FIXED CODE ###

import sys
H, W, M = map(int, input().split())
h_list, w_list = [0]*H, [0]*W
check = set()
for _ in range(M):
    h, w = map(int, input().split())
    check.add((h-1, w-1))
    h_list[h-1] += 1
    w_list[w-1] += 1
h_max, w_max = max(h_list), max(w_list)
h_bom = [i for i in range(H) if h_list[i]==h_max]
w_bom = [i for i in range(W) if w_list[i]==w_max]
for h in h_bom:
    for w in w_bom:
        if not (h, w) in check:
            print(h_max+w_max)
            sys.exit()
print(h_max+w_max-1)
array = map(int, input().split())
print(f'{ "bust" if sum(array) >= 22 else "win"}')


### FIXED CODE ###

array = map(int, input().split())
if sum(array) >= 22:
  print("bust")
else:
  print("win")