Harryxun/stf_run huggingface dataset:
import numpy as np
from sys import stdin
H, W = [int(_) for _ in stdin.readline().rstrip().split()]
S = [stdin.readline().rstrip() for _ in range(H)]

left = [[0]*W for i in range(H)]
right = [[0]*W for i in range(H)]
up = [[0]*W for i in range(H)]
down = [[0]*W for i in range(H)]

for i in range(H):
    p = 0
    for j in range(W):
        if S[i][j] == '#':
            p = 0
        else:
            p += 1
        left[i][j] = p
for i in range(H):
    p = 0
    for j in range(W)[::-1]:
        if S[i][j] == '#':
            p = 0
        else:
            p += 1
        right[i][j] = p
for j in range(W):
    p = 0
    for i in range(H):
        if S[i][j] == '#':
            p = 0
        else:
            p += 1
        up[i][j] = p
for j in range(W):
    p = 0
    for i in range(H)[::-1]:
        if S[i][j] == '#':
            p = 0
        else:
            p += 1
        down[i][j] = p

ans = 0
for i in range(H):
    for j in range(W):
        if S[i][j] == '#':
            continue
        ans = max(ans, left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3) 

print(ans)

### FIXED CODE ###

from sys import stdin
H, W = [int(_) for _ in stdin.readline().rstrip().split()]
S = [stdin.readline().rstrip() for _ in range(H)]

left = [[0]*W for i in range(H)]
right = [[0]*W for i in range(H)]
up = [[0]*W for i in range(H)]
down = [[0]*W for i in range(H)]

for i in range(H):
    p = 0
    for j in range(W):
        if S[i][j] == '#':
            p = 0
        else:
            p += 1
        left[i][j] = p
for i in range(H):
    p = 0
    for j in range(W)[::-1]:
        if S[i][j] == '#':
            p = 0
        else:
            p += 1
        right[i][j] = p
for j in range(W):
    p = 0
    for i in range(H):
        if S[i][j] == '#':
            p = 0
        else:
            p += 1
        up[i][j] = p
for j in range(W):
    p = 0
    for i in range(H)[::-1]:
        if S[i][j] == '#':
            p = 0
        else:
            p += 1
        down[i][j] = p

ans = 0
for i in range(H):
    for j in range(W):
        if S[i][j] == '#':
            continue
        ans = max(ans, left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3) 

print(ans)
import sys


S_raw = sys.stdin.readline().strip()

def check_next(S):
    S = list(S)
    before_num=S[0]
    for i in range(len(S)):
        if S[i]!=before_num:
            S.pop(i-1)
            #S = list(S)
            S.pop(i-1)
            new_S = S
            return S,1
            break
    return S,0


cnt=0
N=0

while cnt<20:
    S_raw, check_cnt = check_next(S_raw)
    N += check_cnt
    if check_cnt==0:
        break
    cnt+=1
    
print(N*2)

### FIXED CODE ###

S = input()

num0 = S.count("0")
num1 = len(S)-num0

print(min(num0,num1)*2)
N,X = map(int,input().split())
L = list(map(int,input().split()))

curCoord = 0
n = 1

while (curCoord<=X and n<=(N+1)):
    n = n+1
    curCoord = curCoord+L[n-2]
    
print(n-1)

### FIXED CODE ###

N,X = map(int,input().split())
L = list(map(int,input().split()))

curCoord = 0
n = 1

while (curCoord<=X):
    n = n+1
    
    if (n>N+1):
        break
    else:
        curCoord = curCoord+L[n-2]

print(n-1)
n = input 
R = n * 2 * 3.1415926535 

### FIXED CODE ###

n = float(input())
R = 2*3.1415926535*n
print(R)
import math
N = int(input())

d = int(math.log(25*N+26, 26)-0.0000001)
pre = (pow(26,d)-26)//25
diff = N - pre
ans = [97 for _ in range(d)]
# print(d, diff)
for i in range(d):

    if i == d-1:
        ans[i] += diff -1
        break
    if diff % pow(26, d-1-i) == 0:
        x = 25
    else:
        x = diff // pow(26, d-1-i)
    # x = diff//26
    ans[i] += x
    # if x == 0:
    #     continue
    diff -= x*pow(26, d-1-i)
    # print(x, diff, pow(26, d-1-i))
# print(ans)
for a in ans:
    print(chr(a), end='')

### FIXED CODE ###

N = int(input())
ans = ''
while N >0:
    N -= 1
    ans += chr(97 + N%26)
    N //= 26
print(ans[::-1])
x,n = map(int,input().split())
a = list(map(int,input().split()))

lower = min(a)
upper = max(a)
mini = 10000005
res = -1
for i in range(lower-1,upper+2):
    if i not in a:
        if abs(x-i)<mini:
            mini = abs(x-i)
            res = i

print(res)


### FIXED CODE ###

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

if n==0:
    print(x)
else:
    a = list(map(int,input().split()))
    lower = min(a)
    upper = max(a)
    mini = 10000005
    res = -1
    for i in range(lower-1,upper+2):
        if i not in a:
            if abs(x-i)<mini:
                mini = abs(x-i)
                res = i

    print(res)
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))

print('%s %s %s' % (min(a),max(a),sum(a)))

### FIXED CODE ###

n = int(input())
a = [int(i) for i in input().split()]
print(min(a),max(a),sum(a))
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
tmp = 9
for i in [A, B, C, D, E]:
    if i % 10 == 0:
        continue
    else:
        if i % 10 < tmp:
            tmp = i % 10
            last = i

ans = 0
for i in [A, B, C, D, E]:
    if i % 10 == 0:
        ans += i
    else:
        ans += i + (10-i%10)

print(ans-(10-last%10))

### FIXED CODE ###

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
tmp = 9
last = 0
for i in [A, B, C, D, E]:
    if i % 10 == 0:
        continue
    else:
        if i % 10 <= tmp:
            tmp = i % 10
            last = i

ans = 0
for i in [A, B, C, D, E]:
    if i % 10 == 0:
        ans += i
    else:
        ans += i + (10-i%10)

print(ans-(10-last%10) if last != 0 else ans)
N, K = input().split()
K = int(K)
count = 1  # 最初は必ず含む
l = []
l_true = []
S = 0
S1 = 1
for i in range(int(N)):
    l.append(int(input()))
for S1 in range(int(N)):
   for i in range(int(N)):
       if abs(l[S] - l[S1]) <= K:
            l_true.append(A2)
            count += 1
            S += 1
            S1 += 1
        else:
            pass


print(count)

### FIXED CODE ###

K = input()
ALC = ""
for i in range(int(K)):
    ALC += "ACL"
print(ALC)
N = int(input())
x = int(n**.5)
while N%x:
  x-=1

print(len(str(N//x)))

### FIXED CODE ###

N = int(input())
a = len(str(N))

for i in range(1,int(N**(1/2))+1):
  if N%i==0:
    a=len(str(N//i))

print(a)
N=input()
a=list(map(int,input().split()))
i=0
T=True
while T:
    a=list(map(lambda x: x/2,a))
    c=list(map(lambda x : True if x%2 ==0 else False,a))    
    for k in c:
        if k==False:
            T=False
            i-=1
    i+=1
print(i)

### FIXED CODE ###

print(input().count("1"))
s=input()
flag = True
for i in range(n):
  if (i % 2 == 0 and s[i] == 'L') or (i % 2 == 1 and s[i] == 'R')
    flag = False
if flag:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

s = input()
flag = True
for i in range(len(s)):
    if (i % 2 == 0 and s[i] == 'L') or (i % 2 == 1 and s[i] == 'R'):
        flag = False
if flag:
    print("Yes")
else:
    print("No")
x, a = int(input().split())
if x < a:
  print(0)
else:
  print(10)

### FIXED CODE ###

x, a = list(map(int, input().split()))
if x < a:
  print(0)
else:
  print(10)
r, g, b = map(int, input().split())
ans=100*r+10*g+b
if ans*4==0:
    print("YES")
else:
    print("NO")


### FIXED CODE ###

k, x = map(int, input().split())
cost=500*k
if x <=cost:
    print("Yes")
else:
    print("No")
a, b, c = (int(i) for i in input().split())  
    d=(a+b+c)/17
    e=(max(a,b)-2+max(a,c)+max(b,c))/17
     
    if(d==1 and e==1): print("YES")
    else: print("NO")
    

### FIXED CODE ###

a, b, c = (int(i) for i in input().split())
d=(a+b+c)/17
e=(max(a,b)-2+max(a,c)+max(b,c))/17
     
if(d==1 and e==1): print("YES")
else: print("NO")
import collections
import itertools

N = int(input())
L = []
D = {}
for _ in range(N):
    x = input()
    L.append(x)

counter = collections.Counter(L)

mode_v = counter.most_common()[0][-1]
it = itertools.takewhile(
    lambda kv: kv[-1] == mode_v, counter.most_common()
)

print(sorted(*(k for k, v in it)))


### FIXED CODE ###

N = int(input())
L = []
D = {}
for _ in range(N):
    x = input()
    L.append(x)

for x in L:
    D[x] = 0
    
for x in L:
    D[x] += 1

SortD = sorted(D.items(), key=lambda x:x[1])
maxD = SortD[-1][1]
ans = []
for x in reversed(SortD):
    if x[1] == maxD:
        ans.append(x[0])
    else:
        break
for x in sorted(ans):
    print(x)
# def C(n, r ,mod=10**9+7):
#     if n-r<r: r=n-r
#     if r == 0: return 1
#     if r == 1: return n
# 
#     numerator = [n - r + k + 1 for k in range(r)]
#     denominator = [k + 1 for k in range(r)]
# 
#     for p in range(2,r+1):
#         pivot = denominator[p - 1]
#         if pivot > 1:
#             offset = (n - r) % p
#             for k in range(p-1,r,p):
#                 numerator[k - offset] /= pivot
#                 denominator[k] /= pivot
# 
#     result = 1
#     for k in range(r):
#         if numerator[k] > 1:
#             result *= int(numerator[k]) %mod
# 
#     return result % mod

A=list(input())
n=len(A)
mod=10**9+7
ans=0
numa= A[0]=="A" 
numa_= A[0]=="?"
numc=A[2:].count("C")
numc_= A[2:].count("?")

for i in range(1,n-1):
    #print(numa,numa_,numc,numc_)
    apro=cpro=0
    if A[i]=="B" or A[i]=="?":
        # for k in range(numa_+1):
        #     apro+= (((C(numa_,k)*pow(2,numa_-k,mod))%mod)*(numa+k))%mod
        # for k in range(numc_+1):
        #     cpro+= (((C(numc_,k)*pow(2,numc_-k,mod))%mod)*(numc+k))%mod
        #print(apro,cpro)
        apro= (3*numa+numa_)*3**(numa_-1)
        cpro= (3*numc+numc_)*3**(numc_-1)
        ans+= (apro*cpro)%mod
        ans%=mod
    if A[i] == "A":
        numa+=1
    if A[i]=="?":
        numa_+=1
    if A[i+1] =="C":
        numc-=1
    if A[i+1]=="?":
        numc_-=1
print(ans)


### FIXED CODE ###

# def C(n, r ,mod=10**9+7):
#     if n-r<r: r=n-r
#     if r == 0: return 1
#     if r == 1: return n
# 
#     numerator = [n - r + k + 1 for k in range(r)]
#     denominator = [k + 1 for k in range(r)]
# 
#     for p in range(2,r+1):
#         pivot = denominator[p - 1]
#         if pivot > 1:
#             offset = (n - r) % p
#             for k in range(p-1,r,p):
#                 numerator[k - offset] /= pivot
#                 denominator[k] /= pivot
# 
#     result = 1
#     for k in range(r):
#         if numerator[k] > 1:
#             result *= int(numerator[k]) %mod
# 
#     return result % mod

A=list(input())
n=len(A)
mod=10**9+7
ans=0
numa= A[0]=="A" 
numa_= A[0]=="?"
numc=A[2:].count("C")
numc_= A[2:].count("?")

for i in range(1,n-1):
    #print(numa,numa_,numc,numc_)
    apro=cpro=0
    if A[i]=="B" or A[i]=="?":
        # for k in range(numa_+1):
        #     apro+= (((C(numa_,k)*pow(2,numa_-k,mod))%mod)*(numa+k))%mod
        # for k in range(numc_+1):
        #     cpro+= (((C(numc_,k)*pow(2,numc_-k,mod))%mod)*(numc+k))%mod
        #print(apro,cpro)
        apro= ((3*numa+numa_)*pow(3,(numa_-1),mod))%mod
        cpro= ((3*numc+numc_)*pow(3,(numc_-1),mod))%mod
        ans+= (apro*cpro)%mod
        ans%=mod
    if A[i] == "A":
        numa+=1
    if A[i]=="?":
        numa_+=1
    if A[i+1] =="C":
        numc-=1
    if A[i+1]=="?":
        numc_-=1
print(ans)
def ans(n): 
    if (n == 0 or n == 9): 
        return True
    if (n < 9): 
        return False
  
    return ans((int)(n>>3) - (int)(n&7)) 
  
n = input()
print('Yes' if ans(int(n)) else 'No')
  

### FIXED CODE ###

def ans(n): 

    aa = 0
    for i in n:
        aa+=int(i)
    return True if aa%9==0 else False
        
  
n = input()

print('Yes' if ans(n) else 'No')
n,a = int(input().split())
print((n*n)-a)

### FIXED CODE ###

n = int(input())
a = int(input())

print((n*n)-a)
import queue

# directions
x_dir = [0, 1, 0, -1]
y_dir = [1, 0, -1, 0]

# map info
visited = []
maps = []


# bfs algorithm
def bfs(h, w, cheese, sx, sy, moves):
    que = queue.Queue()
    que.put((moves, sx, sy))

    for i in range(h):
        for j in range(w):
            visited[i][j] = (maps[i][j] != 'X')

    visited[sy][sx] = False

    while que.qsize() > 0:
        c_moves, c_x, c_y = que.get()
        if maps[c_y][c_x] == cheese:
            return (c_moves, c_x, c_y)

        for i in range(4):
            n_x = c_x + x_dir[i]
            n_y = c_y + y_dir[i]

            if(0 <= n_x < w and 0 <= n_y < h and visited[n_y][n_x]):
                que.put((c_moves+1, n_x, n_y))
                visited[n_y][n_x] = False

    return (-1, -1, -1)


# main function
if __name__ == '__main__':
    str = (input()).split()

    H = int(str[0])
    W = int(str[1])
    N = int(str[2])

    del str

    visited = [[True for i in range(W)] for j in range(H)]
    maps = ["" for i in range(H)]

    x, y = 0, 0
    for i in range(H):
        maps[i] = input()
        for j in range(W):
            if maps[i][j] == 'S':
                x, y = j, i

    moves = 0
    for i in range(1, N+1, 1):
        moves, x, y = bfs(H, W, str(i), x, y, moves)

    print(str(moves))

### FIXED CODE ###

# directions
x_dir = [0, 1, 0, -1]
y_dir = [1, 0, -1, 0]

# map info
visited = []
maps = []

# bfs algorithm
def bfs(h, w, cheese, sx, sy, moves):
    que = [(moves, sx, sy)]

    for i in range(h):
        for j in range(w):
            visited[i][j] = (maps[i][j] != 'X')

    visited[sy][sx] = False

    while len(que) > 0:
        c_moves, c_x, c_y = que.pop(0)
        if maps[c_y][c_x] == cheese:
            return (c_moves, c_x, c_y)

        for i in range(4):
            n_x = c_x + x_dir[i]
            n_y = c_y + y_dir[i]

            if(0 <= n_x < w and 0 <= n_y < h and visited[n_y][n_x]):
                que.append((c_moves+1, n_x, n_y))
                visited[n_y][n_x] = False

    return (-1, -1, -1)

# main function
if __name__ == '__main__':
    inputs = (input()).split()

    H = int(inputs[0])
    W = int(inputs[1])
    N = int(inputs[2])

    visited = [[True for i in range(W)] for j in range(H)]
    maps = ["" for i in range(H)]

    x, y = 0, 0
    for i in range(H):
        maps[i] = input()
        for j in range(W):
            if maps[i][j] == 'S':
                x, y = j, i

    moves = 0
    for i in range(1, N+1, 1):
        moves, x, y = bfs(H, W, str(i), x, y, moves)

    print(str(moves))
import math
N = int(input())
F = [[] * 10 for i in range(N)]
for i in range(N):
    F[i] = list(map(int, input().split()))
P = [[] * 11 for i in range(N)]
for i in range(N):
    P[i] = list(map(int, input().split()))
L = [0] * 10
Sum_max = -float(math.inf)
for i in range(1, 1024):
    for j in range(10):
        L[j] = i % 2
        i = int(i / 2)
    Sum = 0
    for j in range(N):
        count = 0
        for k in range(10):
            if L[k] == 1 and F[j][k] == 1:
                count += 1
        Sum += P[j][count]
    Sum_max = max(Sum_max, Sum)
print(Sum_max)


### FIXED CODE ###

import math
N = int(input())
F = [[] * 10 for i in range(N)]
for i in range(N):
    F[i] = list(map(int, input().split()))
P = [[] * 11 for i in range(N)]
for i in range(N):
    P[i] = list(map(int, input().split()))
L = [0] * 10
Sum_max = -float("inf")
for i in range(1, 1024):
    for j in range(10):
        L[j] = i % 2
        i = int(i / 2)
    Sum = 0
    for j in range(N):
        count = 0
        for k in range(10):
            if L[k] == 1 and F[j][k] == 1:
                count += 1
        Sum += P[j][count]
    Sum_max = max(Sum_max, Sum)
print(Sum_max)
N = int(input())
A = list(map(int, input().split()))
Q = int(input())

SUM=0
num=[0]*100000
for i in range(N):
    a=A[i]
    num[a]+=1
    SUM+=a

B=[0] * Q
C=[0] * Q
for i in range(Q):
    B[i],C[i]  = list(map(int, input().split()))

for i in range(Q):
    b = B[i]
    c = C[i]

    SUM = SUM - b * num[b]
    SUM = SUM + c * num[b]
    num[c] += num[b]
    num[b] = 0
    print(SUM)

### FIXED CODE ###

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

SUM=0
numbers=[0]*100001
for i in range(N):
    a=A[i]
    numbers[a]+=1
    SUM+=a

B=[0] * Q
C=[0] * Q
for i in range(Q):
    B[i],C[i]  = list(map(int, input().split()))

for i in range(Q):
    b = B[i]
    c = C[i]

    SUM = SUM - b * numbers[b]
    SUM = SUM + c * numbers[b]
    numbers[c] += numbers[b]
    numbers[b] = 0
    print(SUM)
import sys
import math

def resolve():
A, B, H, M = map(int, sys.stdin.readline().split())
theta = (H * 30 + M * 0.5)  - (M * 6)
ans = math.sqrt((A**2 + B**2) - (2 * A * B) * math.cos(math.radians(theta)))
print('{:.20f}'.format(ans))

### FIXED CODE ###

import sys
import math

A, B, H, M = map(int, sys.stdin.readline().split())
theta = (H * 30 + M * 0.5)  - (M * 6)
ans = math.sqrt((A**2 + B**2) - (2 * A * B) * math.cos(math.radians(theta)))
print('{:.20f}'.format(ans))
import sys
sys.setrecursionlimit(10000)
def resolve():
    s = input()
    K = int(input())
    mem = []
    kinds = list(set(s)).sort()
    skips = []
    if len(kinds) > K:
        skips = kinds[K+1:]
    for j in range(len(s)): # window starts at
        if s[j] in skips:
            continue
        for i in range(1, len(s)+1): # window size
            subs = s[j:j+i]
            mem.append(subs)
    mem = sorted(list(set(mem)))
    # print(mem)
    print(mem[K-1])


if '__main__' == __name__:
    resolve()

### FIXED CODE ###

import sys
sys.setrecursionlimit(10000)
def resolve():
    s = input()
    K = int(input())
    mem = []
    for i in range(1, K+1): # window size
        for j in range(len(s)): # window starts at
            subs = s[j:j+i]
            if subs not in mem:
                mem.append(subs)
    mem.sort()
    # print(mem)
    print(mem[K-1])
    
    
if '__main__' == __name__:
    resolve()
alpha1='abcdefghijklmnopqrstuvwxyz'
alpha2='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
n,k = list(map(int,input().split()))
s = input()

for i in range(26):
  if alpha2[i] == s[k-1]:
    t = i
    break
s[k-1] = alpha1[t]
print(s)


### FIXED CODE ###

alpha1='abcdefghijklmnopqrstuvwxyz'
alpha2='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
n,k = list(map(int,input().split(" ")))
s = list(input())

for i in range(26):
  if alpha2[i] == s[k-1]:
    t = i
    break
s[k-1]=alpha1[t]
for i in range(n):
  print(s[i],end="")
import sys
sys.setrecursionlimit(10**5)
def main():
    n = int(input())
    h = [int(x) for x in input().split()]
    history = [None for i in range(n)]

    def f(n, h):
        if history[n-1] != None:
            return history[n-1]
        if n <= 1:
            history[0] = 0
            return 0
        elif n == 2:
            history[1] = abs(h[1]-h[0])
            return history[1]
        else:
            d1 = abs(h[n-1]-h[n-2]) + f(n-1,h)
            d2 = abs(h[n-1]-h[n-3]) + f(n-2,h)
            history[n-1] = min(d1,d2)
            return history[n-1]
    print(f(n,h))


if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**5)
def main():
    n = int(input())
    h = [int(x) for x in input().split()]
    memo = [None for i in range(n)]

    def rec(n):
        if memo[n-1] == None:
            if n <= 1:
                memo[n-1] = 0
            elif n == 2:
                memo[n-1] = abs(h[1]-h[0])
            else:
                d1 = rec(n-2)+abs(h[n-1]-h[n-3])
                d2 = rec(n-1)+abs(h[n-1]-h[n-2])
                memo[n-1] = min(d1,d2)
        return memo[n-1]
        
    print(rec(n))

if __name__ == "__main__":
    main()
dict = {"A":1,"C":2,"G":3,"T":4}
def a2n(a):
	ans = 0
	for i in range(len(a)):
		ans += dict[a[i]]*4**i
	return ans
	
n = int(raw_input())
ls = [0 for i in range(1000000)]
for i in range(n):
    inp = raw_input()
    if inp[0] == "i":
        ls[a2n(inp[7:])] = 1
    else:
        print "yes" if ls[a2n(inp[5:])] else "no"
            

### FIXED CODE ###

n = int(raw_input())
ls = {}
for i in range(n):
    inp = raw_input()
    if inp[0] == "i":
        ls[inp[7:]] = 1
    else:
        try:
        	if ls[inp[5:]]: print "yes"
        except:
        	print "no"
n = int(input())
given_a = list(map(int, input().split()))

money = 1000
kabu = 0

a = []

for kabuka in given_a:
    if len(a) > 0 and a[-1] == kabuka:
        continue
    else:
        a.append(kabuka)

n = len(a)
for i in range(n):
   if i == 0:
       if a[i+1] < a[i]:
           continue
       else:
           kabu += money // a[i]
           money %= a[i]
   elif i == n-1:
       money += kabu * a[i]
       kabu = 0
   else:
       if a[i-1] < a[i] and a[i] > a[i+1]:
           money += kabu * a[i]
           kabu = 0
       if a[i-1] > a[i] and a[i] < a[i+1]:
           kabu += money // a[i]
           money %= a[i]

print(money)
           
       


### FIXED CODE ###

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

money = 1000
kabu = 0

a = []

for kabuka in given_a:
    if len(a) > 0 and a[-1] == kabuka:
        continue
    else:
        a.append(kabuka)

n = len(a)

if n == 1:
    print(money)
    exit()
    
for i in range(n):
   if i == 0:
       if a[i+1] < a[i]:
           continue
       else:
           kabu += money // a[i]
           money %= a[i]
   elif i == n-1:
       money += kabu * a[i]
       kabu = 0
   else:
       if a[i-1] < a[i] and a[i] > a[i+1]:
           money += kabu * a[i]
           kabu = 0
       if a[i-1] > a[i] and a[i] < a[i+1]:
           kabu += money // a[i]
           money %= a[i]

print(money)
s = input()
ans = "AC"
if s[0] != 'A':
    ans = "WA"
cnt = 0
for i in s[2:-1]:
    if i.isupper() and i!='C':
        ans ="WA"
    elif i=='C':
        cnt +=1

if cnt!=1:
    flag=False
print("AC"if flag else "WA")


### FIXED CODE ###

s = input()
ans = "AC"
if s[0] != 'A':
    ans = "WA"
cnt = 0
for i in range(1,len(s)):
    if s[i].isupper():
        if i == 1 or s[i]!= "C" or i==len(s)-1:
            ans = "WA"
        cnt+=1
if cnt!=1:
    ans="WA"
print(ans)
a = input()
print(a + a ** 2 + a ** 3)

### FIXED CODE ###

a = int(input())
print(a + a ** 2 + a ** 3)
S = input()
for i in S:
  if i == "o":
    ans += 100
  if i == "x":
    ans += 0
print(ans)


### FIXED CODE ###

S = input()
ans = 700
for i in S:
  if i == "o":
    ans += 100
  if i == "x":
    ans += 0
print(ans)
A=list(input())
B=list(input())
A=list(input())
X=A
while True:
    if X[0] == "a":
        X = A
        X.pop(0)
        if len(X) == 0:
            print("A")
    elif X[0] == "b":
        X = B
        X.pop(0)
        if len(X) == 0:
            print("B")
    else:
        X = C
        X.pop(0)
        if len(X) == 0:
            print("C")

### FIXED CODE ###

A = list(str(input()))
B = list(str(input()))
C = list(str(input()))
X="a"
while True:
    if X == "a":
        if len(A) == 0:
            print("A")
            break
        X = A[0]
        A.pop(0)
    elif X == "b":
        if len(B) == 0:
            print("B")
            break
        X = B[0]
        B.pop(0)
    else:
        if len(C) == 0:
            print("C")
            break
        X = C[0]
        C.pop(0)
n = int(input())
t = list(map(int,input().split()))
m = int(input())

for i in range(m):
    p,x = list(map(int,input().split()))
    a = t.copy()
    a[p-1] = x
    print(sum(a))


### FIXED CODE ###

a, o, b = list(input().split())
a,b = int(a),int(b)
print(a+b if o == '+' else a-b)
import operator as o
import functools as f
n,*a=map(int,open(0).read().split())
#print(f.reduce(o.mul,a))
a=[s for s in a if s%2==0]
x=f.reduce(o.mul,a)
count=0
while True:
    if x%2==0:
        x=x//2
        count+=1
    else:
        break
print(count)

### FIXED CODE ###

n,*a=map(int,open(0).read().split())
#print(f.reduce(o.mul,a))
a=[s for s in a if s%2==0]
if len(a)==0:
    print(0)
    exit()
count=0

for x in a:
    while True:
        if x%2==0:
            x=x//2
            count+=1
        else:
            break
print(count)
lis = []

N,M = [int(i) for i in input().split()]
M_ = M
i = 2

while True:
    if M % i == 0:
        M = M // i
        lis.append(i)
    elif M == 1:
        break
    else:
        i += 1
ans = M_

for n in range(2**len(lis)):
    m = bin(n)[-1:1:-1]
    ret = 1
    for l in range(len(m)):
        if int(m[l]):
            ret *= lis[l]
           # print(lis[l])
            if  ret >= N:
                break
    if ret >= N:
        #print(ret)
        ans = min(ans,ret)

print(M_//ans)


### FIXED CODE ###

N = input()

if N == '1':
    print("Hello World")

else:
    print(int(input()) + int(input()))