Harryxun/stf_run huggingface dataset:
input_lst = list(map(int, input().split()))
h, w, k = input_lst[0], input_lst[1], input_lst[2]

def row_comb(w):
    if w <= 0:
        return 0
    if w == 1:
        return 1
    if w == 2:
        return 2
    else:
        return row_comb(w-2)+row_comb(w-1)

@lru_cache(maxsize=1000)
def trio(h,w):
    if h == 0:
        return [1] + [0 for i in range(w)]
    else:
        lst = []
        for i in range(1, w+1):
            if i == 1:
                lst.append(trio(h-1,w)[0] * row_comb(w-1) + trio(h-1,w)[1] * row_comb(w-2))
            elif i == w:
                lst.append(trio(h-1,w)[w-1] * row_comb(w-1) + trio(h-1,w)[w-2] * row_comb(w-2))
            elif i == 2:
                lst.append(trio(h-1,w)[0] * row_comb(w-2) + trio(h-1,w)[2] * row_comb(w-3) + trio(h-1,w)[1] * row_comb(w-2))
            elif i == w-1:
                lst.append(trio(h-1,w)[w-1] * row_comb(w-2) + trio(h-1,w)[w-3] * row_comb(w-3) + trio(h-1,w)[w-2] * row_comb(w-2))
            elif i > 2 and i < w-1:
                a = row_comb(i-2) * row_comb(w-i)
                b = row_comb(i-1) * row_comb(w-i-1)
                c = row_comb(i-1) * row_comb(w-i)
                lst.append(trio(h-1,w)[i-2] * a + trio(h-1,w)[i] * b + trio(h-1,w)[i-1] * c)
        return lst
    
print(trio(h, w)[k-1] % 1000000007)

### FIXED CODE ###

from functools import lru_cache

input_lst = list(map(int, input().split()))
h, w, k = input_lst[0], input_lst[1], input_lst[2]

def row_comb(w):
    if w < 0:
        return 0
    elif w <= 1:
        return 1
    elif w == 2:
        return 2
    else:
        return row_comb(w-2)+row_comb(w-1)

@lru_cache(maxsize=1000)
def trio(h,w):
    if h == 0:
        return [1] + [0 for i in range(10)]
    else:
        lst = []
        for i in range(1, w+1):
            if i == 1:
                lst.append(trio(h-1,w)[0] * row_comb(w-1) + trio(h-1,w)[1] * row_comb(w-2))
            elif i == w:
                lst.append(trio(h-1,w)[w-1] * row_comb(w-1) + trio(h-1,w)[w-2] * row_comb(w-2))
            elif i == 2:
                lst.append(trio(h-1,w)[0] * row_comb(w-2) + trio(h-1,w)[2] * row_comb(w-3) + trio(h-1,w)[1] * row_comb(w-2))
            elif i == w-1:
                lst.append(trio(h-1,w)[w-1] * row_comb(w-2) + trio(h-1,w)[w-3] * row_comb(w-3) + trio(h-1,w)[w-2] * row_comb(w-2))
            elif i > 2 and i < w-1:
                a = row_comb(i-2) * row_comb(w-i)
                b = row_comb(i-1) * row_comb(w-i-1)
                c = row_comb(i-1) * row_comb(w-i)
                lst.append(trio(h-1,w)[i-2] * a + trio(h-1,w)[i] * b + trio(h-1,w)[i-1] * c)
        lst = lst + [0 for i in range(10)]
        return lst
    
print(trio(h, w)[k-1] % 1000000007)
import math
def yuk(a, b):
    ans = int(a / b)
    amari = a % b
    if amari != 0:
        ans = yuk(b, amari)
    else:
        ans = b
    return ans


N = int(input())
alst = list(map(int, input().split()))
ans = alst[0]
for i in range(1, N):
    if ans > alst[i]:
        ans = math.gcd(ans, alst[i])
    else:
        ans = math.gcd(alst[i], ans)
print(ans)

### FIXED CODE ###

def yuk(a, b):
    ans = int(a / b)
    amari = a % b
    if amari != 0:
        ans = yuk(b, amari)
    else:
        ans = b
    return ans

N = int(input())
alst = list(map(int, input().split()))
ans = alst[0]
for i in range(1, N):
    if ans > alst[i]:
        ans = yuk(ans, alst[i])
    else:
        ans = yuk(alst[i], ans)
print(ans)
import sys
import numpy as np

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

N = ir()
A = np.zeros(N+2, np.int32)
A[1:-1] = np.array(read().split(),np.int32)

left_max = np.maximum.accumulate(A[:-2])
right_max = np.maximum.accumulate(A[::-1])[::-1][2:]
answer = np.maximum(left_max, right_max)
print('\n'.join(answer.astype(str)))


### FIXED CODE ###

n = int(input())
a = [int(input()) for i in range(n)]
max_a = max(a)
second_a = sorted(a)[-2]
max_count = a.count(max_a) - 1
if max_count:
    [print(max_a) for _ in range(len(a))]
else:
    [print(max_a) if a[i] != max_a else print(second_a) for i in range(len(a))]
N = input()
B = False
kaisu = 0
array[] = map(int,input().split())
while !B:
	for i in range(N):
  		if array[i]/2 == 1:
    	B = True
  	if B == False:
    	array = map(calc ,array)
    	kaisu++
  	else:
    	break
        
print(kaisu)

def calc(n):
  retuen n/2
    

    

### FIXED CODE ###

N = int(input())
B = False
kaisu = 0
array = list(map(int,input().split()))

def calc(n):
  return int(n) / 2
  
  
while not B:
  for i in range(N):
    if array[i] % 2 == 1:
      B = True
  if not B:
    array = list(map(calc, array))
    kaisu += 1
  else:
    break
        
print(kaisu)
import sys
import math
import itertools
import collections
from collections import deque

sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline().strip()

NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()

def main():
    N = NI()
    h = NLI()
    
    dp = [0 for _ in range((10**5)+10)]
    dp[0] = 0
    dp[1] = abs(h[1]-h[0])
    
    for n in range(2,N):
        dp[n] = min(dp[n-2]+abs(h[n]-h[n-2]),dp[n-1]+abs(h[n]-h[n-1]))
    print(dp[n])


if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
import math
import itertools
import collections
from collections import deque
 
sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline().strip()
 
NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()
 
def main():
    N = NI()
    h = NLI()
    
    dp = [0 for _ in range((10**5)+10)]
    dp[0] = 0
    dp[1] = abs(h[1]-h[0])
    
    for n in range(2,N):
        dp[n] = min(dp[n-2]+abs(h[n]-h[n-2]),dp[n-1]+abs(h[n]-h[n-1]))
    print(dp[N-1])
 
 
if __name__ == '__main__':
    main()
#coding:utf-8

s = list(input())
ramen = 700

print(700 + 100 * ramen.count('o'))


### FIXED CODE ###

#coding:utf-8

s = list(input())
ramen = 700

print(700 + 100 * s.count('o'))
X, Y, Z, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

ABl = []
for a in Al:
    for b in Bl:
        ABl.append(a+b)

result = []
ABl = sorted(ABl,reverse=True)[:K]
for ab in ABl:
    for c in Cl:
        result.append(ab+c)

result.sort(reverse=True)

for i in range(K):
    print(result[i])


### FIXED CODE ###

x,y,z,k=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
e=[]
for ai in a:
    for bi in b:
        e.append(ai+bi)
e.sort(reverse=True)
e=e[:k]
ans=[]
for ci in c:
    for ei in e:
        ans.append(ci+ei)
ans.sort(reverse=True)
for i in range(k):
    print(ans[i])
import math
x,a,c=map(int,input().split())
if math.fabs(x-a)<math.fabs(x-b):
    print('A')
else:
    print('B')

### FIXED CODE ###

x,a,b=map(int,input().split())
if abs(x-a)<=abs(x-b):
    print('A')
else:
    print('B')
n,k = map(int, input())
lis = []
for i in range(1,n+1):
    count = 0
    while i < k:
        i *= 2
        count += 1
    lis.append(count)
result = 0
for i in lis:
    result += 1 / n * 0.5 **i
print(result)

### FIXED CODE ###

n,k = map(int, input().split())
lis = []
for i in range(1,n+1):
    count = 0
    while i < k:
        i *= 2
        count += 1
    lis.append(count)
result = 0
for i in lis:
    result += 1 / n * 0.5 **i
print(result)
A, B = map(int, input().split())
print(A ^ B)

### FIXED CODE ###

A = int(input())
B = int(input())
print(A ^ B)
n = list(map(int, input.split()))

ans = str(n[0])+str(n[1])

print(ans)

### FIXED CODE ###

n = input().split()

ans = str(n[1])+str(n[0])

print(ans)
N=int(input())
L=list(map(int,input().split()))
A=1
for i in range(N):
  A=A*L[i]
  if 10**18<A:
print(-1)
  else:
print(A)
  exit()

### FIXED CODE ###

N=int(input())
L=list(map(int,input().split()))
A=1
if 0 in L:
  print(0)
  exit()
for i in range(N):
  A=A*L[i]
  if 10**18<A:
    print(-1)
    exit()
print(A)
N, M = map(int, input().split())

md = []
for i in range(0,N):
  d, m = map(int, input().split())
  md.append({"m":m, "d":d-1})

md = sorted(md, key=lambda x:x["m"], reverse=True)

def aa(sh, idx, M, x, ans):
  if idx >= M:
    return sh, ans, x
  elif sh[idx] == 0:
    sh[idx] = idx+1
    sh[x["d"]] = idx+1
    ans += x["m"]
    return sh, ans, x
  else:
    zz = idx
    sh, ans, x = aa(sh, sh[idx], M, x, ans)
    sh[zz] = sh[x["d"]]
    return sh, ans, x
  
sh = [0]*M
ans = 0
for x in md:
  idx = x["d"]
  sh, ans, x = aa(sh, idx, M, x, ans)
print(ans)

### FIXED CODE ###

def insertHeap(array, val):
    array.append(val)
    n = len(array)-1
    while n != 0:
        parent = int((n - 1) / 2)
        if array[n] > array[parent]:
            tmp = array[n]
            array[n] = array[parent]
            array[parent] = tmp
            n = parent
        else:
            break
    return array

def desertHeap(array):
    if array == []:
      return None
    array[0], array[-1] = array[-1], array[0]
    res = array.pop(-1)
    n = len(array)
    if n == 0 or n == 1: 
      return res
    parent = 0
    while True:
        child = 2 * parent + 1
        if child >= n: break
        if (child + 1 < n) and array[child] < array[child + 1]:
            child += 1
        if array[parent] < array[child]:
            array[child], array[parent] = array[parent], array[child]
            parent = child;
        else:
            break
    return res

n, m = map(int, input().split())
 
li = [[] for j in range(10**5+1)]
 
for _ in range(n):
  a, b = map(int, input().split())
  li[a].append(b)
 
ans = 0
jobsHeap = []
for i in range(1, m+1):
  for val in li[i]:
    jobsHeap = insertHeap(jobsHeap, val)
  
  if jobsHeap != []:
    res = desertHeap(jobsHeap)
    ans += res
print(ans)
a,b=map(int,input().split())
print(max[a*b,a+b,a-b])

### FIXED CODE ###

a,b=map(int,input().split())
print(max(a*b,a+b,a-b))
if __name__ == "__main__":
  n = int(input())
  x,y,z = [0]*n,[0]*n,[0]*n
  # ３点h>=に点があれば一意に求まる
  count = 0
  xyh = [[],[],[]]
  #print(xyh)
  for i in range(n):
    x[i],y[i],z[i] = map(int,input().split())
    #if z[i] != 0 and count < 3:
    if z[i] != 0:
      xyh[count].append(x[i])
      xyh[count].append(y[i])
      xyh[count].append(z[i])
      #print(xyh)
      count += 1
  #print(xyh)
  x,y,h = 0,0,0
  pass_ = 0
  #print(count)
  for i in range(101):
    for j in range(101): # x,y の座標を定める
      h = abs(i-xyh[0][0])+abs(j-xyh[0][1]) + xyh[0][2]
      for k in range(count):
        if h - abs(i-xyh[k][0])-abs(j-xyh[k][1]) - xyh[k][2] == 0:
          if k == count -1:
            print(i,j,h)
            exit(0)
        else:
          break

### FIXED CODE ###

#!/usr/bin/env python3
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = int(readline())
xyh = [input() for _ in range(n)]
#print(xyh)
for x_ in range(101):
    for y_ in range(101):
        cur_h = 0 #flga の場所をループの中に入れない
        for i in range(n):
            x = int(xyh[i].split()[0])
            y = int(xyh[i].split()[1])
            h = int(xyh[i].split()[2])
            h_ = h + (abs(x_ - x) + abs(y_ - y))
            if cur_h == 0 and h > 0:
                cur_h = h_  #決め打ちの高さ        
            else:
                if h > 0:
                    if cur_h != h_: break
                elif cur_h -(abs(x_ - x) + abs(y_ - y)) > 0: break
        for i in range(n):
            x = int(xyh[i].split()[0])
            y = int(xyh[i].split()[1])
            h = int(xyh[i].split()[2])
            h_ = h + (abs(x_ - x) + abs(y_ - y))
            if cur_h == 0 and h > 0:
                cur_h = h_  #決め打ちの高さ        
            else:
                if h > 0:
                    if cur_h != h_: break
                elif cur_h -(abs(x_ - x) + abs(y_ - y)) > 0: break   
                if i == n-1: 
                    print(x_,y_,cur_h)
                    #print("hello")
                    exit(0)
N , A , B = (map(int , input().split()))
a = ''
l = -(-N//(A + B))
for i in range(l):
    a += 'b'*A
    a += 'r'*B
print(list(a[:N]).count('b'))

### FIXED CODE ###

N , A , B = (map(int , input().split()))
def divmod_(a ,b):
    q, mod = divmod(a ,b)
    return q, mod
c , d = divmod_(N ,A+B)
if (d - A) > 0:
    d = A
print((c * A) + d)
a,b,x=map(int,input().split())
print(b//x-a//a+1)

### FIXED CODE ###

a,b,x=map(int,input().split())
print(b//x-(a-1)//x)
n, q = map(int, input().split())
s = input()
a = []
for i in range(q):
    a.append(list(map(int, input().split())))
lis = [[0, 0]]
count = 0
for i in range(n):
    if s[i] == 'A':
        if i + 1 != n - 1 and s[i+1] == 'C':
            count += 1
    lis.append([i+1, count])
for i in range(q):
    l = a[i][0] - 1
    r = a[i][1] - 1
    print(lis[r][1] - lis[l][1])




### FIXED CODE ###

n, q = map(int, input().split())
s = input()
a = []
for i in range(q):
    a.append(list(map(int, input().split())))
lis = [[0, 0]]
count = 0
for i in range(n):
    if s[i] == 'A':
        if i+1 <= n-1 and s[i+1] == 'C':
            count += 1
    lis.append([i+1, count])
for i in range(q):
    l = a[i][0] - 1
    r = a[i][1] - 1
    print(lis[r][1] - lis[l][1])
#!/usr/bin/env python3
import sys
from collections.abc import Iterable
from math import *
from itertools import *
from collections import *
from functools import *
from operator import *
try:
    from math import gcd
except Exception:
    from fractions import gcd

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(H: int, W: int, s: "List[str]"):
    m = [[0] * W for _ in range(H)]
    for j in range(len(s)):
        for i in range(len(s[j])):
            if s[j][i] == '#':
                if j < (len(s) - 1) and s[j+1][i] == '#':
                    m[j][i] += 1
                    m[j+1][i] += 1
                if i < (len(s[j]) - 1) and s[j][i+1] == '#':
                    m[j][i] += 1
                    m[j][i+1] += 1
                if m[j][i] == 0:
                    return NO
    return YES


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    s = [ next(tokens) for _ in range(W) ]  # type: "List[str]"
    result = solve(H, W, s)
    if isinstance(result, Iterable) and not isinstance(result, str):
        result = '\n'.join([str(v) for v in result])
    print(result)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys
from collections.abc import Iterable
from math import *
from itertools import *
from collections import *
from functools import *
from operator import *
try:
    from math import gcd
except Exception:
    from fractions import gcd

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(H: int, W: int, s: "List[str]"):
    m = [[0] * W for _ in range(H)]
    for j in range(H):
        for i in range(W):
            if s[j][i] == '#':
                if j < (H - 1) and s[j+1][i] == '#':
                    m[j][i] += 1
                    m[j+1][i] += 1
                if i < (W - 1) and s[j][i+1] == '#':
                    m[j][i] += 1
                    m[j][i+1] += 1
                if m[j][i] == 0:
                    return NO
    return YES


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    s = [ next(tokens) for _ in range(H)]  # type: "List[str]"
    result = solve(H, W, s)
    if isinstance(result, Iterable) and not isinstance(result, str):
        result = '\n'.join([str(v) for v in result])
    print(result)

if __name__ == '__main__':
    main()
A,op,B=input().strip().split()
if op == '+':
  print(A+B)
else:
  print(A-B)

### FIXED CODE ###

A,op,B=input().strip().split()
if op == '+':
  print(int(A)+int(B))
else:
  print(int(A)-int(B))
a = int(input())
b = int(input())
c = int(input())
if (a+b+c)>=22:
    print('bust')
else:
    print('win')


### FIXED CODE ###

a, b, c = [int(x) for x in input().split()]
if a + b + c >= 22:
    print("bust")
else:
    print("win")
S = input()

if S == AAA or BBB:
    print('No')
else:
    print('Yes')

### FIXED CODE ###

S = input()
 
if (S == 'AAA') or (S == 'BBB'):
    print('No')
else:
    print('Yes')
if S =="ABC":
  print("ARC")
else:
  print("ABC")

### FIXED CODE ###

S = input()
if S ==("ABC"):
  print("ARC")
else:
  print("ABC")
def Input():
    return map(int, input().split(" "))


def main():
    n = int(input())
    h = list(reversed(Input()))
    count = 0
    ans = 0
    for i in range(n-1):
        if h[i] <= h[i+1]:
            count += 1
        else:
            ans = max(ans, count)
            count = 0
    print(ans)
main()

### FIXED CODE ###

def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    n = int(input())
    h = list(reversed(Input()))
    val = 0
    ans = 0
    for i in range(1, n):
        if h[i-1] <= h[i]: val += 1
        else: val = 0
        ans = max(ans, val)
        
    print(ans)
main()
def main():
    n,m=map(int,input().split())
    uf=UnionFind(n)
    for a,b in (map(lambda x: int(x)-1, input().split()) for _ in range(m)):
        uf.union(a,b)
    print(max((uf.size(x) for x in uf.roots())))
    
if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    n,m=map(int,input().split())
    ab=[map(lambda x: int(x)-1,input().split()) for _ in range(m)]
    uf=UnionFind(n)
    for a,b in ab:
        uf.union(a,b)
    ans = 0
    for s in uf.roots():
        ans = max(uf.size(s),ans)
    print(ans)

class UnionFind():
    '''Union-Find'''
    
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

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

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def is_same(self, x, y) -> bool:
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())
    
if __name__ == "__main__":
    main()
from math import gcd, ceil


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


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

for i in range(n):
    a[i] = a[i]//2

lcm_v = a[0]
for i in range(1, n):
    lcm_v = lcm(lcm_v, a[i])

ok = True
for aa in a:
    if (lcm_v//aa) % 2 != 1:
        ok = False
        break

if ok:
    ans = ((m//lcm_v)+1)//2
print(ans)

### FIXED CODE ###

# ABC150 D
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
from fractions import gcd
from math import ceil
def lcm(x, y):
    return (x * y) // gcd(x, y)
n,m=nm()
a=nl()
ans=0
a=[x//2 for x in a] 

lcm_v=a[0]
for i in range(n):
    lcm_v=lcm(lcm_v,a[i])
ok_flg=[(lcm_v//i)%2==1 for i in a]
if all(ok_flg):
    ans=((m//lcm_v)+1)//2
print(ans)
n=input()
l=map(int,raw_input().split())
flag=0
for i in xrange (n-1):
  p=list(l)
  del p[i]
  del p[i+1]
  if (l[i]^l[i+1]) not in p:
    flag=1
    break
if flag:
  print "No"
else:
  print "Yes"

### FIXED CODE ###

n=input()
l=map(int,raw_input().split())
ans=0
for i in xrange (n):
  ans^=l[i]
if ans:
  print "No"
else:
  print "Yes"
a,b,c=map(int,input().split())
print("YES" if a[0)+a[1]>=a[3] else "NO")

### FIXED CODE ###

a,b,c=map(int,input().split())
print("Yes" if a+b>=c else "No")
a, b = map(int, input())
x = 0
outlet = 1
while outlet < b:
  --outlet
  outlet += a
  x+=1
print(x)

### FIXED CODE ###

a, b = map(int, input().split())
x = 0
outlet = 1
while outlet < b:
  outlet -= 1
  outlet += a
  x+=1
print(x)
import numpy as np
tmp=[int(i) for i in input().split(' ')]
tmp_s=np.array([int(i) for i in input().split(' ')])
score=np.zeros(tmp[0]-tmp[1]+1)
for i in range(tmp[0]-tmp[1]+1):
  if i==0:
    score[0]=np.prod(tmp_s[:tmp[1]])
  else:
    if tmp_s[i-1]==0:
      score[i]=np.prod(tmp_s[i:i+tmp[1]])
    else:
      score[i]=tmp_s[i+tmp[1]]*score[i-1]/tmp_s[i-1]
    
    if score[i-1]<score[i]:
      print('Yes')
    else:
      print('No')

### FIXED CODE ###

X=int(input())
if X>=400 and X<=599:
  print(8)
elif X>=600 and X<=799:
  print(7)
elif X>=800 and X<=999:
  print(6)
elif X>=1000 and X<=1199:
  print(5)
elif X>=1200 and X<=1399:
  print(4)
elif X>=1400 and X<=1599:
  print(3)
elif X>=1600 and X<=1799:
  print(2)
elif X>=1800 and X<=1999:
  print(1)
A = open(0).read()
B = {'A':'T', 'T':'A', 'C':'G', 'G':'C'}
print(B[A])

### FIXED CODE ###

A = input()
B = {'A':'T', 'T':'A', 'C':'G', 'G':'C'}
print(B[A])
import numpy as np
import heapq

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

links = []

sums = np.zeros(n + 1)

oya = {}

for _ in range(n - 1):
  a, b= map(int, input().split())
  oya[b] = a
  heapq.heappush(links, [a, b])

uppers = np.eye(n + 1)

for l in links:
  oyaId = l[0]
  koId = l[1]
  uppers[oyaId, koId] = 1
  while True: 
    if oyaId in oya:
      uppers[oyaId, koId] = 1
      oyaId = oya[oyaId]
    else:
      uppers[oyaId, koId] = 1
      break
      
for _ in range(m):
  p, x = map(int, input().split())
  sums += x * uppers[p, :]
print(*sums[1:].astype(np.int))
  

### FIXED CODE ###

from collections import defaultdict

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

links = [[] for x in range(n + 1)]
sums = [0 for x in range(n + 1)]
adds = [0 for x in range(n + 1)]

links[0].append(1)
for _ in range(n - 1):
  a, b= map(int, input().split())
  links[a].append(b)
  links[b].append(a)

for _ in range(m):
  p, x = map(int, input().split())
  adds[p] += x

# print(links)
que = [0,[1]]
checked = [0 for x in range(n+1)]

que = [[-1, [0]]]

while que:
  link = que.pop()
  # print(link)
  par = link[0]
  childs = link[1]

  for child in childs:
    if checked[child] != 1:
      sums[child] = sums[par] + adds[child]
      que.append([child, links[child]])
      checked[child] = 1

  
print(*sums[1:])
N = int(input())

result = {}
for _ in range(N):
  s = input()
  result[s] = result.get(s, 0) + 1

print(f"AC x {result['AC']}")
print(f"WA x {result['WA']}")
print(f"TLE x {result['TLE']}")
print(f"RE x {result['RE']}")

### FIXED CODE ###

N = int(input())

result = {}
for _ in range(N):
  s = input()
  result[s] = result.get(s, 0) + 1

print(f"AC x {result.get('AC', 0)}")
print(f"WA x {result.get('WA', 0)}")
print(f"TLE x {result.get('TLE', 0)}")
print(f"RE x {result.get('RE', 0)}")
import sys
n = list(map(int, sys.stdin.readline().strip()))
s = sum(i if i <= 5 else 10 - i for i in n)
if (n[0] > 5 and n[1] < 6) or (n[0] <= 5 and n[1] >= 6):
    s += 1
print(s)


### FIXED CODE ###

n = list(map(int, input()[::-1])) + [0]
s = 0
res = 0
for i, ni in enumerate(n[:-1]):
    k = ni + s
    if k < 5 or (k == 5 and int(n[i + 1]) < 5):
        res += k
        s = 0
    else:
        res += 10 - k
        s = 1
res += s
print(res)
n=int(input())
a=2
b=1
c=0
for i in range(N):
  c=a+b
  a=b
  b=c
print(c)

### FIXED CODE ###

n=int(input())
a=2
b=1
c=0
if n==0:
    c=2
elif n==1:
    c=1
else:
    for i in range(n-1):
        c=a+b
        a=b
        b=c
print(c)