Harryxun/stf_run huggingface dataset:
from collections import Counter

S = input()
s = list(S)

counter = Counter(s)
odd = 0
flag = True

for k,v in counter.items():
    #偶奇性の判定
    if k != 'x':
        if v%2 == 1:
            odd += 1
            mid = k
    if odd >= 2:#奇数個ある小文字が複数ある場合できない
        flag = False

#"x"を除いた時の回文判定
if flag:
    s_sub = S.replace("x","")

    indexes = [i for i,x in enumerate(s_sub)if x == mid]
    center = indexes[len(indexes)//2 ]#奇数個ある数の中央のindexをとる
    if s_sub[center-1::-1] != s_sub[center+1:]:
        flag == False

#各アルファベットの距離判定
if flag:
    indexes = [i for i,x in enumerate(s) if x == mid]
    center = indexes[len(indexes)//2 ]
    count = 0
    hidari = []
    migi = []

    for i in range(0,center)[::-1]:
        if s[i] == 'x':
            count += 1
        else:
            hidari.append(count)
            count = 0
    
    hidari.append(count)
    count = 0

    for i in range(center+1,len(s)):
        if s[i] == 'x':
            count += 1
            
        else:
            migi.append(count)
            count = 0

    migi.append(count)
    count = 0

    ans = 0
    for i in range(len(hidari)):
        ans += abs(hidari[i]-migi[i])
            
    print(ans)
 

else:
    print(-1)
            

### FIXED CODE ###

s = list(input())
count = 0
l = 0
r = len(s)-1

#リストsの先頭と末尾を比較
#先頭と末尾がx以外で異なるなら,-1を返す。
#先頭と末尾が同じなら先頭と末尾を移動させる。
#どちらか片方がxなら片方にxを追加し先頭と末尾を移動させたとするので最初にxだったほうだけ移動させる

#xabxa
while l != r:
    if s[l] != s[r]:
        if s[l] != "x" and s[r] != "x":
            count = -1
            break
        elif s[l] == "x" and s[r] != "x":
            l += 1
            count += 1
        elif s[r] == "x" and s[l] != "x":
            r -= 1
            count += 1
    elif s[l] == s[r]:
        if abs(l-r) == 1:
            break
        else:
            l += 1
            r -= 1

print(count)
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N = int(input())
ls = [x+1 for x in range(N)]
candidates = [str(x) for x in ls if "7" in str(x) and "5" in str(x) and "3" in str(x))
count = 0
for _ in range len(candidates):
    candlist = list(candidates)
    ls2 = [x for x in candlist if x != 7 and x != 5 and x != 3]
    if ls2 is False:
        count += 1

print(count)


### FIXED CODE ###

#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N = int(input())

def dfs(s):
    if int(s) > N:
        return 0
    ret =1 if all (s.count(c) > 0 for c in '753') else 0
    for c in '753':
        ret += dfs (s+c)
    return ret

print(dfs('0'))
a,b=map(int,input().split())

int(a*b)

### FIXED CODE ###

import math
from decimal import Decimal
a,b=map(Decimal,input().split())

print(math.floor(a*b))
s=list(input())
n=s.count(o)
print(700+100*n)

### FIXED CODE ###

s=list(input())
n=s.count("o")
print(700+100*n)
import sys
input = sys.stdin.readline
def dfs(v, seen, overall, connected_components):
    seen[v] = True
    connected_components.add(v)
    for nv in overall[v]:
        if seen[nv] == True:continue
        dfs(nv, seen, overall, connected_components)
def main():
    N, M, K = map(int, input().split())
    overall = {}
    friends = {}
    blocks = {}
    for i in range(N):
        overall[i] = set()
        friends[i] = set()
        blocks[i] = set()
    for _ in range(M):
        a, b = map(int, input().split())
        overall[a-1].add(b-1)
        overall[b-1].add(a-1)
        friends[a-1].add(b-1)
        friends[b-1].add(a-1)
    for _ in range(K):
        c, d = map(int, input().split())
        blocks[c-1].add(d-1)
        blocks[d-1].add(c-1)
    ans = {}
    seen = [False] * N
    for i in range(N):
        if seen[i] == True:continue
        connected_components = set()
        dfs(i, seen, overall, connected_components)
        for v in list(connected_components):
            ans[v] = connected_components - {v}
    for i in range(N):
        print(len(ans[i]-friends[i]-blocks[i]), end=" ")
if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys
sys.setrecursionlimit(2147483647)
input = sys.stdin.readline

N, M, K = map(int, input().split())
friends = {i: set() for i in range(N)}
blocks = {i: set() for i in range(N)}

for _ in range(M):
    a, b = map(int, input().split())
    friends[a-1].add(b-1)
    friends[b-1].add(a-1)

for _ in range(K):
    a, b = map(int, input().split())
    blocks[a-1].add(b-1)
    blocks[b-1].add(a-1)

counts = [0] * N
seen = [False] * N
def dfs(v):
    if seen[v] == True:
        return
    seen[v] = True
    for node in friends[v]:
        c.add(node)
        dfs(node)
 
for v in range(N):
    if seen[v] == True:
        continue
    c = set()
    dfs(v)
    l = len(c)
    for i in c:
        counts[i] = l - 1
        counts[i] -= len(c & friends[i])
        counts[i] -= len(c & blocks[i])
print(' '.join(map(str, counts)))
n=int(input())
a=list(map(int,input().split()))
ans = 0
for i in range(n-2):
  s = a[i+1] -a[i] 
  if s >=0:
    ans = ans +0
    else:
      ans = ans - s
      a[i+1]=a[i]-s
else:
  print(ans)
      

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
ans = 0
for i in range(n-1):
  s = a[i+1] -a[i] 
  if s < 0:
      ans = ans - s
      a[i+1]=a[i]
print(ans)
a,b=map(int,input().split())
x1=a*100//8
x2=b*10
 if x1//10==b:
    print(x1)
else:
    print(-1)


### FIXED CODE ###

a,b=map(int,input().split())
ans=-1
for i in range(1,10000):
    if i*8//100==a and i*10//100==b:
        ans=i
        break
print(ans)
import sys
sys.stdin = open('d3.in')

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

prefix = [set() for _ in range(n + 1)]
# suffix = [set() for _2 in range(n + 1)]

prefix[0] = {0}
for i in range(n):
    for v in prefix[i]:
        prefix[i+1].add(v)
        if v + a[i] <= k:
            prefix[i+1].add(v + a[i])

suffix_i = {0}

# Cumulative sums
c_suffix = [[0] * (k+1) for _3 in range(n + 1)]

for j in range(k):
    c_suffix[n][j + 1] = c_suffix[n][j] + (j in suffix_i)

for i in range(n - 1, -1, -1):
    to_add = set()
    for v in suffix_i:
        if v + a[i] <= k:
            to_add.add(v + a[i])
    suffix_i.update(to_add)
    for j in range(k):
        c_suffix[i][j + 1] = c_suffix[i][j] + (j in suffix_i)


def find(i):
    if k <= a[i]:
        return 0
    for s in prefix[i]:
        start = max(0, k - a[i] - s)
        stop = k - s
        if c_suffix[i + 1][stop] - c_suffix[i + 1][start] > 0:
            return 0
    return 1


res = 0
for i in range(n):
    res += find(i)
print(res)


### FIXED CODE ###

from math import sqrt

x = int(input())
n = int(sqrt(2 * x)) - 10
while not (n - 1) * n // 2 < x <= n * (n + 1) // 2:
    n += 1
print(n)
n=int(input())
if(n%9==0):
  print("Yes")
else:
  print("No)

### FIXED CODE ###

n=int(input())
if(n%9==0):
  print("Yes")
else:
  print("No")
A = int(input())
B = list(map(int,input().split(" ")))
best_count = 0
count = 0
Y = 0
list = []
number_start = 0
number_sub = 0
for i in range(A - 1):
    count = 0
    number_start = B[i]
    number_sub = B[i + 1]
    while Y == 0:
        if number_start < number_sub:
            break
        else:
            if i +count  == A - 2:
                count += 1
                break
            else:
                count += 1
                number_start = B[i + count]
                number_sub = B[i + count + 1]  
    list.append(count)
print(max(list))

### FIXED CODE ###

max_score = 0
total = int(input())
now = 0
count = 0 
i = 0
if total == 1:
    print(0)
    exit()
number_list = list(map(int,input().split(" ")))
while i == 0:
    if number_list[now] >= number_list[now+1] and now+1 != total-1:
        count += 1
        now += 1
    elif number_list[now] >= number_list[now+1] and now+1 == total-1:
        count += 1
        now += 1
        if max_score < count:
            max_score = count
        break
    elif number_list[now] < number_list[now+1] and now+1 == total-1:
        break
    else:
        now += 1
        if max_score < count:
            max_score = count
            count = 0
        else:
            count = 0
            continue
print(max_score)
while True:
    try:
        N, Q = map(int, input().split())
        verts = [None] * N
        results = [0] * N
        for i in range(N - 1):
            a, b = map(int, input().split())
            a -= 1
            b -= 1
            if verts[a] is None:
                verts[a] = list()
            verts[a].append(b)

        maxmap = [None] * N
        map_b = [None] * N
        def trav(a, x):
            map_b[x] = a
            if verts[a] is None:
                return x
            for i in verts[a]:
                maxmap[i] = x = trav(i, x + 1)
            return x

        maxmap[0] = trav(0, 0)

        for i in range(Q):
            q, x = map(int, input().split())
            q-= 1
            if q == 0:
                for i in range(N):
                    results[i] += x
            elif verts[q] is not None:
                for i in range(map_b.index(q), maxmap[q] + 1):
                    results[i] += x
            else:
                results[q] += x
        print(" ".join(map(str, results)))
    except EOFError:
        break

### FIXED CODE ###

while True:
    try:
        N, Q = map(int, input().split())
        verts = [None] * N
        qs = [0] * N
        results = [0] * N
        for i in range(N - 1):
            a, b = map(int, input().split())
            a -= 1
            b -= 1
            if verts[a] is None:
                verts[a] = list()
            if verts[b] is None:
                verts[b] = list()
            verts[a].append(b)
            verts[b].append(a)
        for i in range(Q):
            q, x = map(int, input().split())
            q -= 1
            qs[q] += x
        rests = [(0, None)]
        while rests:
            x, parent = rests.pop()
            if parent is not None:
                results[x] += results[parent]
            results[x] += qs[x]
            for i in verts[x]:
                if i != parent:
                    rests.append((i, x))
        print(" ".join(map(str, results)))
    except EOFError:
        break
n, m = map(int, input().split())
d = {}
def f(n):
    if n not in d:
        d[n] = 1
    else:
        d[n] += 1
for _ in [0]*m:
    a, b = map(int, input().split())
    f(a)
    f(b)
for i in range(1, n+1):
    print(d[i])

### FIXED CODE ###

n, m = map(int, input().split())
d = {}
for i in range(1, n+1): d[i] = 0
for _ in [0]*m:
    a, b = map(int, input().split())
    d[a] += 1
    d[b] += 1
for i in d.values():
    print(i)
input()
a=input()
if len(a)%2==0 and a[:len(a)/2]==a[len(a)/2:]:
	print("Yes")
else:
	pritn("No")

### FIXED CODE ###

input()
a=input()
if len(a)%2==0 and a[:len(a)//2]==a[len(a)//2:]:
	print("Yes")
else:
	print("No")
import sys

# 価値 x 以上の握手を全て行うとする
# 握手回数が決まる。左手ごとに集計できる。

import numpy as np

N, M = map(int, sys.stdin.readline().rstrip().split())
A = np.array(int(x) for x in sys.stdin.readline().rstrip().split())

A.sort()  # A を昇順に並び替える


# x より価値が高くなる握手の総数
#  -> a に対して、相手は x - a が必要
#   -> A = [a0, a1, a2, ...] に対して、[x-a0の開始位置, x-a1の開始位置, x-a2の開始位置,...] を探す
def shake_cnt(x):
    # x 以上の握手を全て行うとして、握手の回数を数える行わない握手を数える
    X = np.searchsorted(A, x - A)  # ソートされたリストA に対して、x - A が挿入される位置を返す
    return N * N - X.sum()  # index の和は「小さい方」を指しているので、引く


# 二分探索  握手の回数が
left = 0  # 握手の回数がM以上
right = 10 ** 6  # 握手の回数がM未満 <- まだ足りない側
while 1 < right - left:  # left と right が隣り合ったら終了
    x = (left + right) // 2
    if shake_cnt(x) >= M:
        left = x
    else:
        right = x

# M回には届かないけれど、M回に限りなく近くなる価値 x = right
X = np.searchsorted(A, right - A)  # 各a in A が握手を行わない人数のArray
shake = N * N - X.sum()  # ここまでの握手回数

Acum = np.zeros(N + 1, np.int64)  # 人数 -> 累積和
# Acum = [a0, a0+a1, a0+a1+a2, ....] を計算して、ai さんが k番目以降と握手をすれば
Acum[1:] = np.cumsum(A)  # cumsum [1,2,3,4,5,6,...] -> [1,3,6,10,15,21,...]

# 右手の幸福度は ai * ((a0+a1+...a(n-1)) - (a(k-1)+...+a(n-1))) を得られる
# 左手の幸福度は 回数だけで決まる（何人と握手とするか）
happy = (Acum[-1] - Acum[X]).sum() + (A * (N - X)).sum()

happy += (M - shake) * left  # 不足分。1回の価値は M とわかっている

print(happy)


### FIXED CODE ###

import sys
import numpy as np

# 価値 x 以上の握手を全て行うとする
# 握手回数が決まる。左手ごとに集計できる。

N, M = map(int, sys.stdin.readline().rstrip().split())
A = np.array(sys.stdin.readline().rstrip().split(), np.int64)

A.sort()  # A を昇順に並び替える

# x より価値が高くなる握手の総数
#  -> a に対して、相手は x - a が必要
#   -> A = [a0, a1, a2, ...] に対して、[x-a0の開始位置, x-a1の開始位置, x-a2の開始位置,...] を探す
def shake_cnt(x):
    # x 以上の握手を全て行うとして、握手の回数を数える行わない握手を数える
    X = np.searchsorted(A, x - A)  # ソートされたリストA に対して、x - A が挿入される位置を返す
    return N * N - X.sum()  # index の和は「小さい方」を指しているので、引く


# 二分探索  握手の回数が
left = 0  # 握手の回数がM以上
right = 10 ** 6  # 握手の回数がM未満 <- まだ足りない側
while 1 < right - left:  # left と right が隣り合ったら終了
    x = (left + right) // 2
    if shake_cnt(x) >= M:
        left = x
    else:
        right = x

# M回には届かないけれど、M回に限りなく近くなる価値 x = right
X = np.searchsorted(A, right - A)  # 各a in A が握手を行わない人数のArray
shake = N * N - X.sum()  # ここまでの握手回数

Acum = np.zeros(N + 1, np.int64)  # 人数 -> 累積和
# Acum = [a0, a0+a1, a0+a1+a2, ....] を計算して、ai さんが k番目以降と握手をすれば
Acum[1:] = np.cumsum(A)  # cumsum [1,2,3,4,5,6,...] -> [1,3,6,10,15,21,...]

# 右手の幸福度は ai * ((a0+a1+...a(n-1)) - (a(k-1)+...+a(n-1))) を得られる
# 左手の幸福度は 回数だけで決まる（何人と握手とするか）
happy = (Acum[-1] - Acum[X]).sum() + (A * (N - X)).sum()

happy += (M - shake) * left  # 不足分。1回の価値は M とわかっている

print(happy)
N = int(input())
A = list(map(int,input().split()))
A = 1
for i in A:
    A *= i
    if A== 0:
        break
if ans > 10**18:
    print(-1)
else:
    print(ans)

### FIXED CODE ###

def mul2():
    n = int(input())
    a = list(map(int, input().split()))
    
    if 0 in a:
        return 0
    ans = 1
    for i in a:
        ans *= i
        if ans > 1000000000000000000:
            return -1
        
    return ans 
print(mul2())
a=b=c=d=e=f=0;g=1;exec('a,b,c,d,e,f,g=b,e,e-d,f,g,g-c,(g*4-b-c-d-a*3))%(10**9+7);'*int(input()));print(g)

### FIXED CODE ###

n=int(input())
A,C,G,T,M=0,1,2,3,10**9+7
r=range
dp=[[[[0]*4for k in r(4)]for j in r(4)]for i in r(n+1)]
dp[0][T][T][T]=1
for i in r(1,n+1):
  for j in r(4):
    for k in r(4):
      for l in r(4):
        for m in r(4):
          if any(t==(k,l,m)for t in((A,G,C),(A,C,G),(G,A,C)))or(j,l,m)==(A,G,C)or(j,k,m)==(A,G,C):continue
          dp[i][k][l][m]=(dp[i][k][l][m]+dp[i-1][j][k][l])%M
print(sum(dp[n][i][j][k]for i in r(4)for j in r(4)for k in r(4))%M)
n = int(input())
k = n%8
t = n//k
ans = [[2,3,4,6,8,9,10,12],[6],[6,12],[2,6,12],[2,4,8,10],[2,4,6,8,10],[2,3,4,8,9,10],[2,3,4,6,8,9,10]][k]
if k == 0:
  for i in ranke(1,t):
    ans.append(i * 12 + 2)
    ans.append(i * 12 + 3)
    ans.append(i * 12 + 4)
    ans.append(i * 12 + 6)
    ans.append(i * 12 + 8)
    ans.append(i * 12 + 9)
    ans.append(i * 12 + 10)
    ans.append(i * 12 + 12)
else:
  for i in ranke(1,t+1):
    ans.append(i * 12 + 2)
    ans.append(i * 12 + 3)
    ans.append(i * 12 + 4)
    ans.append(i * 12 + 6)
    ans.append(i * 12 + 8)
    ans.append(i * 12 + 9)
    ans.append(i * 12 + 10)
    ans.append(i * 12 + 12)
print(*ans)

### FIXED CODE ###

n = int(input())
k = n%8
t = n//8
if n == 3:
  print(*[2,5,63])
  quit()
ans = [[2,3,4,6,8,9,10,12],[6],[3,9],[3,6,9],[2,3,9,10],[2,3,6,9,10],[2,3,4,8,9,10],[2,3,4,6,8,9,10]][k]
if k == 0:
  for i in range(1,t):
    ans.append(i * 12 + 2)
    ans.append(i * 12 + 3)
    ans.append(i * 12 + 4)
    ans.append(i * 12 + 6)
    ans.append(i * 12 + 8)
    ans.append(i * 12 + 9)
    ans.append(i * 12 + 10)
    ans.append(i * 12 + 12)
else:
  for i in range(1,t+1):
    ans.append(i * 12 + 2)
    ans.append(i * 12 + 3)
    ans.append(i * 12 + 4)
    ans.append(i * 12 + 6)
    ans.append(i * 12 + 8)
    ans.append(i * 12 + 9)
    ans.append(i * 12 + 10)
    ans.append(i * 12 + 12)
print(*ans)
import sys,queue,math,copy,itertools,bisect,collections,heapq
LI = lambda : [float(x) for x in sys.stdin.readline().split()]
NI = lambda : int(sys.stdin.readline())
N = NI()
p = LI()
dp = [0] * (N+1)
dp[0][0] = 1
for i in range(1,N+1):
    for j in range(0,i+1):
        if j > 0:
            dp[j] = dp[j-1] * p[i-1] + dp[j] * (1-p[i-1])
        else:
            dp[j] = dp[j] *  (1-p[i-1])

print(sum(dp[N//2+1:]))


### FIXED CODE ###

import sys,queue,math,copy,itertools,bisect,collections,heapq
LI = lambda : [float(x) for x in sys.stdin.readline().split()]
NI = lambda : int(sys.stdin.readline())
N = NI()
p = [0.0] + LI()
dp = [[0 for _ in range(N+1)] for _ in range(N+1)]
dp[0][0] = 1
for i in range(1,N+1):
    for j in range(0,i+1):
        if j > 0: dp[i][j] = dp[i-1][j-1] * p[i]
        dp[i][j] += dp[i-1][j] * (1-p[i])

print(sum(dp[-1][N//2+1:]))
# -*- coding: utf-8 -*-

h, w, k = map(int, input().split())

ptn = [[0] * (w + 2) for _ in range(w + 2)]
for i in range(w + 2):
    for j in range(w + 2):
        if i == 0 or i == w or j == 0 or j == w:
            continue
        if abs(i - j) <= 1:
            ptn[i][j] = 1


def f(x):
    l = [1, 2, 3, 5, 7, 13, 19]
    if 0 <= x < 7:
        return l[x]
    else:
        return 1


for _ in range(h - 1):
    temp = [[0] * (w + 2) for _ in range(w + 2)]
    for i in range(w + 2):
        for j in range(w + 2):
            if i == 0 or i == w or j == 0 or j == w:
                continue
            else:
                temp[i][j] = ptn[i-1][j]*f(i-3)*f(w-i-1) + ptn[i][j]*f(i-2)*f(w-i-1) + ptn[i+1][j]*f(i-2)*f(w-i-2)

    ptn = temp

print(ptn[1][k] % 1000000007)


### FIXED CODE ###

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

h, w, k = map(int, input().split())


def f(x):
    lst = [1, 2, 3, 5, 8, 13, 21]
    if 0 <= x < 7:
        return lst[x]
    else:
        return 1


ptn = [[0] * (w + 2) for _ in range(w + 2)]
for i in range(w + 2):
    for j in range(w + 2):
        if i == 0 or i == w + 1 or j == 0 or j == w + 1:
            continue
        elif i == j:
            ptn[i][j] = f(i-2)*f(w-i-1)
        elif i == j + 1:
            ptn[i][j] = f(i-3)*f(w-i-1)
        elif i == j - 1:
            ptn[i][j] = f(i-2)*f(w-i-2)

for _ in range(h - 1):
    temp = [[0] * (w + 2) for _ in range(w + 2)]
    for i in range(w + 2):
        for j in range(w + 2):
            if i == 0 or i == w + 1 or j == 0 or j == w + 1:
                continue
            else:
                temp[i][j] = ptn[i-1][j]*f(i-3)*f(w-i-1) + ptn[i][j]*f(i-2)*f(w-i-1) + ptn[i+1][j]*f(i-2)*f(w-i-2)

    ptn = temp

print(ptn[1][k] % 1000000007)
s = int(input())
str1, str2 = [s for s in input().split()]
print(str1)
print(str2)
ans=[]
for i in range(s-1):
  ans += str1[i]
  ans += str2[i]

  
print(''.join(ans))

### FIXED CODE ###

a = int(input())
b = int(input())
c = a+b
print(6-c)
N = int(input())
A = list(map(int,input().split()))
B = [A[i] - (i+1) for i in range(N)]

B.sort()

print(sum(abs(x - B[2//N]) for x in B))

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
B = [A[i] - (i+1) for i in range(N)]

B.sort()

print(sum([abs(x - B[N//2]) for x in B]))
N, K = map(int, input().split())
H = [int(input()) for _ in range(N)]

H = sorted(H)
ans = float('Inf')
for i in range(N - K + 1):
    ans = min(ans, H[i + 2] - H[i])
print(ans)

### FIXED CODE ###

N, K = map(int, input().split())
H = [int(input()) for _ in range(N)]

H = sorted(H)
ans = float('Inf')
for i in range(N - (K - 1)):
    ans = min(ans, H[i + (K - 1)] - H[i])
print(ans)
import itertools
import numpy as np
N, M, Q = map(int,input().split())
List = [list(map(int, input().split())) for i in range(Q)]

A_full = np.arange(1,M+1)

l_tensu = [0]
for subset in itertools.combinations_with_replacement(A_full, N):
    tensu = 0

    A = list(subset)
    for i in range(Q):
        a = List[i][0] - 1
        b = List[i][1] - 1
        c = List[i][2]
        d = List[i][3]
        if (A[b] - A[a] == c):
            tensu += d
    l_tensu.append(tensu)
    
print(max(l_tensu))

### FIXED CODE ###

import itertools
N, M, Q = map(int,input().split())
List = [list(map(int, input().split())) for i in range(Q)]

A_full = [i for i in range(1,M+1)]

l_tensu = 0
for subset in itertools.combinations_with_replacement(A_full, N):
    tensu = 0

    A = list(subset)
    for i in range(Q):
        a = List[i][0] - 1
        b = List[i][1] - 1
        c = List[i][2]
        d = List[i][3]
        if (A[b] - A[a] == c):
            tensu += d
    if(tensu > l_tensu):
        l_tensu = tensu
    
print(l_tensu)
print(2*(m-1)*(n-d)/n/n if m > 0 else (m-1)/n)

### FIXED CODE ###

n,m,d = map(int,input().split())
print(2*(m-1)*(n-d)/n/n if d > 0 else (m-1)/n)
n = int(input())
l = [int(input()) for i in range(n)]
wa = sum(l)
cnt = 0
for i in l:
    if i % 10:
        cnt += 10
if cnt == n:
    print(0)
    exit()
    
if wa % 10:
    print(wa)
else:
    l.sort()
    for i in l:
        if i % 10 != 0:
            ex = i
            break
    
    print(wa - ex)

### FIXED CODE ###

n = int(input())
l = [int(input()) for i in range(n)]
wa = sum(l)
cnt = 0
for i in l:
    if i % 10 == 0:
        cnt += 1
        
if cnt == n:
    print(0)
    exit()
    
if wa % 10 != 0:
    print(wa)
else:
    l.sort()
    for i in l:
        if i % 10 != 0:
            print(wa - i)
            break
H,W=map(int,input().split())
M = H * W
M2 = M // 2
modm = M % 2
if modm == 0:
    print(M2)
else:
    print(M2 + 1)

### FIXED CODE ###

N = int(input())
Lists = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(Lists[N-1])
# https://qiita.com/_-_-_-_-_/items/34f933adc7be875e61d0
# abcde	s=input()	s='abcde'
# abcde	s=list(input())	s=['a', 'b', 'c', 'd', 'e']
# 5(1つだけ)	a=int(input())	a=5
# 1 2	| x,y = s_inpl()   |	x=1,y=2
# 1 2 3 4 5 ... n 　	li = input().split()	li=['1','2','3',...,'n']
# 1 2 3 4 5 ... n 　	li = inpl()	li=[1,2,3,4,5,...,n]
# FFFTFTTFF 　	li = input().split('T')	li=['FFF', 'F', '', 'FF']

# INPUT
# 3
# hoge
# foo
# bar
# ANSWER
# n=int(input())
# string_list=[input() for i in range(n)]

import math
import copy
from collections import defaultdict, Counter
from itertools import product
from bisect import bisect_left, bisect_right
import numpy as np

def s_inpl(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))

N = int(input())

A = np.array(inpl())

ans = 0
while True:
    A = A/2
    if sum(A) * 10 % 10 != 0:
        break
    ans += 1

print(ans)


### FIXED CODE ###

# https://qiita.com/_-_-_-_-_/items/34f933adc7be875e61d0
# abcde	s=input()	s='abcde'
# abcde	s=list(input())	s=['a', 'b', 'c', 'd', 'e']
# 5(1つだけ)	a=int(input())	a=5
# 1 2	| x,y = s_inpl()   |	x=1,y=2
# 1 2 3 4 5 ... n 　	li = input().split()	li=['1','2','3',...,'n']
# 1 2 3 4 5 ... n 　	li = inpl()	li=[1,2,3,4,5,...,n]
# FFFTFTTFF 　	li = input().split('T')	li=['FFF', 'F', '', 'FF']

# INPUT
# 3
# hoge
# foo
# bar
# ANSWER
# n=int(input())
# string_list=[input() for i in range(n)]

import math
import copy
from collections import defaultdict, Counter
from itertools import product
from bisect import bisect_left, bisect_right
import numpy as np

def s_inpl(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))

N = int(input())

A = np.array(inpl())

ans = 0
while True:
    flag = True
    for i in range(len(A)):
        if A[i] % 2 ==0:
            A[i] = A[i]/2
        else:
            flag = False
            break
    if flag:
        ans += 1
    else:
        break

print(ans)
n = int(input())
s = list(input().split())
if any(i === "Y" for i in s):
  print("Four")
else:
  print("Three")

### FIXED CODE ###

n = int(input())
s = list(input().split())
if any(i == "Y" for i in s):
  print("Four")
else:
  print("Three")
str alpha='B'
if (alpha.isupper()){
  print(A)
}else{
  print(a)
}


### FIXED CODE ###

alpha=input()
if (alpha.isupper()):
  print('A')
else:
  print('a')
A,B,C = map(int,input().split())
if A[-1] == B[0] and B[-1] == C[0]:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

A,B,C = map(str,input().split())
if A[-1] == B[0] and B[-1] == C[0]:
    print("YES")
else:
    print("NO")