Harryxun/stf_run huggingface dataset:
s = open(0).read().split()
x = s[0][0]
s[0] = s[0][1:]

while True:
  p = ord(x)-97
  if len(s[p] == 0):
    print ord(x).upper()
    break
  x = s[p][0]
  s[p] = s[p][1:]


### FIXED CODE ###

s = open(0).read().split()
x = s[0][0]
s[0] = s[0][1:]
 
while True:
  p = ord(x)-97
  if len(s[p]) == 0:
    print(x.upper())
    break
  x = s[p][0]
  s[p] = s[p][1:]
# coding: utf-8

n = int(N)

power = 1
for i in range(1, n+1):
    power *= i
    power = power % (10**9+7)

print(power)

### FIXED CODE ###

# coding: utf-8

n = int(input())

power = 1
for i in range(1, n+1):
    power *= i
    power = power % (10**9+7)

print(power)
A, B = map(int, input())
if A <= 2*B:
  print(0)
else:
  print(A - 2*B)

### FIXED CODE ###

A, B = map(int, input().split())
if A <= 2*B:
  print(0)
else:
  print(A - 2*B)
N = int(input())
S = []
for i in range(N):
    S.append(input())
queue = []
S0len = len(S[0])

for j in range(S0len):
    flag = [0 for m in range(S0len)]
    for k in range(1,N):
        if S[0][j] in S[k]:
            flag[k] = 1
            
    if sum(flag) == N-1:
        queue.append(S[0][j])

queue = sorted(queue)
res = "".join(queue)
        
print(res)


### FIXED CODE ###

N = int(input())
S = []
for i in range(N):
    S.append(list(input()))
queue = []
len = len(S[0])

for j in range(len):
    flag = [0 for m in range(N)]
    for k in range(1,N):
        if S[0][j] in S[k]:
            flag[k] = 1
            S[k].remove(S[0][j])
            
    if sum(flag) == N-1:
        queue.append(S[0][j])

queue = sorted(queue)
res = "".join(queue)
        
print(res)
N, K = map(int, input().split())
A = list(map(int, input().split()))

dic = {}

for a in A:
    if a in dic:
        dic[a] += 1
    else:
        dic[a] = 1

li = [0] * N

for a in dic:
    li[dic[a]] += 1

ans = 0
k = len(dic)

for i in range(N):
    if li[i] > 0:
        if k - li[i] >= K:
            ans += i * li[i]
            k -= li[i]
        else:
            ans += i * (k - li[i])
            k -= li[i]

    if k <= K:
        break

print(ans)

### FIXED CODE ###

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

dic = {}

for a in A:
    if a in dic:
        dic[a] += 1
    else:
        dic[a] = 1

li = [0] * (N + 1)

#  li[i] = j  i:ボールの数 j:種類

for a in dic:
    li[dic[a]] += 1

ans = 0
k = len(dic)

for i in range(N):
    if li[i] > 0:
        if k - li[i] >= K:
            ans += i * li[i]
            k -= li[i]
        else:
            ans += i * (k - K)
            k -= li[i]

    if k <= K:
        break

print(ans)
a = int(N/10)
c = N-a*10

if c == 0 or c==1 or c==6 or c==8:
   print("pon")
elif c==3:
   print("bon")
else:
   print("hon")

### FIXED CODE ###

N = int(input())
a = int(N/10)
c = N-a*10

if c == 0 or c==1 or c==6 or c==8:
   print("pon")
elif c==3:
   print("bon")
else:
   print("hon")
import sys
input=sys.stdin.readline

check=dict()
N,b,d=0,[],0
#ttfは235、chaはabc
def dfs_sub(n,ttf,cha):
    global check,d

    #-1ずつしていく場合
    check[0]=min(check[n]+n*d,check[0])

    #最寄りまで-してく場合
    x1,x2=n//ttf,n%ttf
    if ttf-x2>=x2:
        if check.get(x1) is None:
            if check[x1]>check[n]+x2*d+cha:
                check[x1]=check[n]+x2*d+cha
                dfs(x1)
        else:
            check[x1]=check[n]+x2*d+cha
            dfs(x1)

    #最寄りまで+1してく場合
    x1,x2=n//ttf+1,ttf-n%ttf
    if ttf-x2>x2:
        if check.get(x1) is None:
            if check[x1]>check[n]+x2*d+cha:
                check[x1]=check[n]+x2*d+cha
                dfs(x1)
        else:
            check[x1]=check[n]+x2*d+cha
            dfs(x1)


def dfs(n):
    global b,check,d
    for i,j in zip([2,3,5],b):
        dfs_sub(n,i,j)

t=int(input())
for i in range(t):
    N,*b,d=map(int,input().split())
    check={N:0,0:N*d}
    dfs(N)
    print(check[0])

### FIXED CODE ###

import sys
check=dict()
N,a,b,c,d=0,0,0,0,0
#ttfは235、chaはabc
def dfs_sub(n,ttf,cha):
    global check,d
    if 0 in check:
        check[0]=min(check[n]+n*d,check[0])
    else:
        check[0]=check[n]+n*d
    if n//ttf==0:
        if n//ttf in check:
            if check[n//ttf]>check[n]+(n%ttf)*d:
                check[n//ttf]=check[n]+(n%ttf)*d
        else:
            check[n//ttf]=check[n]+(n%ttf)*d
    else:
        if n//ttf in check:
            if check[n//ttf]>check[n]+(n%ttf)*d+cha:
                check[n//ttf]=check[n]+(n%ttf)*d+cha
                dfs(n//ttf)
        else:
            check[n//ttf]=check[n]+(n%ttf)*d+cha
            dfs(n//ttf)
    if 1+n//ttf in check:
        if check[1+n//ttf]>check[n]+(ttf-n%ttf)*d+cha:
            check[1+n//ttf]=check[n]+(ttf-n%ttf)*d+cha
            dfs(1+n//ttf)
    else:
        check[1+n//ttf]=check[n]+(ttf-n%ttf)*d+cha
        dfs(1+n//ttf)


def dfs(n):
    global check,a,b,c,d
    dfs_sub(n,2,a)
    dfs_sub(n,3,b)
    dfs_sub(n,5,c)

t=int(input())
ans=[0]*t
for i in range(t):
    N,a,b,c,d=map(int,input().split())
    check={N:0}
    dfs(N)
    ans[i]=check[0]
for i in range(t):
    print(ans[i])
S = list(input())
for i in range(len(S)):
  if i % 2 == 0:
   	if S[i] == "R" or "U" or "D":
      continue
   	else:
      print("No")
      exit()
  else:
    if S[i] == "L" or "U" or "D":
      continue
    else:
      print("No")
      exit()
print("Yes")


### FIXED CODE ###

S = list(input())
for i in range(len(S)):
	if i % 2 == 0:
		if (S[i] == "R") or(S[i] ==  "U") or(S[i] ==  "D"):
			continue
		else:
			print("No")
			exit()
	else:
		if (S[i] == "L") or(S[i] ==  "U") or(S[i] ==  "D"):
			continue
		else:
			print("No")
			exit()
print("Yes")
s = list(input())
YYMM = False
MMYY = False

if s[2] == '1':
    if s[3] == '0' | s[3] == '1' | s[3] == '2':
        YYMM = True
if s[2] == '0':
    YYMM = True

if s[0] == 1:
    if s[1] == '0' | s[1] == '1' | s[1] == '2':
        MMYY = True
if s[0] == '0':
    MMYY = True

if YYMM & MMYY:
    print("AMBIGUOUS")
elif YYMM:
    print("YYMM")
elif MMYY:
    print("MMYY")
else:
    print("NA")

### FIXED CODE ###

s = list(input())
YYMM = False
MMYY = False
 
if s[2] == '1':
    if (s[3] == '0') | (s[3] == '1') | (s[3] == '2'):
        YYMM = True
elif s[2] == '0':
    if s[3] != '0':
        YYMM = True
 
if s[0] == '1':
    if (s[1] == '0') | (s[1] == '1') | (s[1] == '2'):
        MMYY = True
elif s[0] == '0':
    if s[1] != '0':
        MMYY = True
 
if YYMM & MMYY:
    print("AMBIGUOUS")
elif YYMM:
    print("YYMM")
elif MMYY:
    print("MMYY")
else:
    print("NA")
import heapq

tmp = list(map(int, input().split()))
x = tmp[0]
y = tmp[1]
z = tmp[2]
k = tmp[3]
a = sorted(list(map(int, input().split())), reverse=True)
b = sorted(list(map(int, input().split())), reverse=True)
c = sorted(list(map(int, input().split())), reverse=True)

#log = [[[False for _ in range(z)] for _ in range(y)] for _ in range(x)]
log = [False] * (x * y * z + 1)
h = []
heapq.heappush(h, (-(a[0]+b[0]+c[0]), 0, 0, 0))
for i in range(k): 
  if len(h) == 0:
    break
  hpop = heapq.heappop(h)
  print(-hpop[0])
  if hpop[1]+1 < x and log[(hpop[1]+1) * y * z + hpop[2] * z + hpop[3]] == False:
    heapq.heappush(h, (-(a[hpop[1]+1]+b[hpop[2]]+c[hpop[3]]), hpop[1]+1, hpop[2], hpop[3]))
    log[(hpop[1]+1) * y * z + hpop[2] * z + hpop[3]] = True
  if hpop[2]+1 < y and log[hpop[1] * y * z + (hpop[2]+1) * z + hpop[3]] == False:
    heapq.heappush(h, (-(a[hpop[1]]+b[hpop[2]+1]+c[hpop[3]]), hpop[1], hpop[2]+1, hpop[3]))
    log[hpop[1] * y * z + (hpop[2]+1) * z + hpop[3]] = True
  if hpop[3]+1 < z and log[hpop[1] * y * z + hpop[2] * z + hpop[3]+1] == False:
    heapq.heappush(h, (-(a[hpop[1]]+b[hpop[2]]+c[hpop[3]+1]), hpop[1], hpop[2], hpop[3]+1))
    log[hpop[1] * y * z + hpop[2] * z + hpop[3]+1] = True

### FIXED CODE ###

tmp = list(map(int, input().split()))
x = tmp[0]
y = tmp[1]
z = tmp[2]
k = tmp[3]
a = sorted(list(map(int, input().split())), reverse=True)
b = sorted(list(map(int, input().split())), reverse=True)
c = sorted(list(map(int, input().split())), reverse=True)

ansl = []
for p in range(x):
  if p > k:
    break
  for q in range(y):
    if p * q > k:
      break
    for r in range(z):
      if p * q * r > k:
        break
      ansl.append(a[p] + b[q] + c[r])

ansl.sort(reverse=True)

for i in range(k):
  print(ansl[i])
k=int(input())
x,y=map(int,input().split())
d=abs(x)+abs(y)
if k%2==0 and d%2!=0:
  print(-1)
else:
  ans=[]
  if d<k and d%2==0:
    n=2
    if abs(x)>=abs(y):
      m=(abs(x)-abs(y))//2
      tk=k-m
      if x<0:
        m*=-1
      if y<0:
        tk*=-1
      ans.append((m,tk))
    else:
      m=(abs(y)-abs(x))//2
      tk=k-m
      if y<0:
        m*=-1
      if x<0:
        tk*=-1
      ans.append((tk,m))
    ans.append((x,y))
  print(n)
  for tx,ty in ans:
    print(tx,ty)

### FIXED CODE ###

def editarr(x,y,arr):
  if abs(x)>=abs(y):
    for i in range(len(arr)):
      arr[i][0],arr[i][1]=arr[i][1],arr[i][0]
  if x<0:
    for i in range(len(arr)):
      arr[i][0]*=-1
  if y<0:
    for i in range(len(arr)):
      arr[i][1]*=-1

k=int(input())
x,y=map(int,input().split())
ans=[]
tx=abs(x)
ty=abs(y)
if tx>=ty:
  tx,ty=ty,tx
if k%2==0 and (tx+ty)%2!=0:
  print(-1)
else:
  if tx+ty<k:
    if (tx+ty)%2==0:
      m=(ty-tx)//2
      ans.append([k-m,m])
    else:
      td=k-(tx+ty)
      ans.append([tx,ty+td])
      ans.append([tx+(k-td//2),ty+td//2])
    ans.append([tx,ty])
    n=len(ans)
  elif ty-(k-tx%k)<k and (ty-(k-tx%k))%2!=0:
    if tx<k and ty<k:
      if (2*k-(tx+ty))%2==0:
        td=2*k-(tx+ty)
        ans.append([tx+td//2,k-(tx+td//2)])
        ans.append([tx,ty])
      else:
        ans.append([tx,k-tx])
        td=ty-(k-tx)
        ans.append([tx+(k-td//2),ans[-1][1]+td//2])
        ans.append([tx,ty])
      n=len(ans)
    else:
      if tx+ty<2*k:
        if (2*k-(tx+ty))%2==0:
          td=2*k-(tx+ty)
          ans.append([tx+td//2,k-(tx+td//2)])
          ans.append([tx,ty])
        else:
          ans.append([tx,k-tx])
          td=ty-(k-tx)
          ans.append([tx+(k-td//2),ans[-1][1]+td//2])
          ans.append([tx,ty])
        n=len(ans)
      else:
        ans.append([0,0])  
  else:
    ans.append([0,0])
    for i in range(tx//k):
      ans.append([ans[-1][0]+k,0])
    if ans[-1][0]!=tx:
      ans.append([tx,k-abs(tx-ans[-1][0])])
    td=ty-ans[-1][1]
    if td%k==0:
      flag=True
    else:
      flag=False
    for i in range(td//k):
      if flag==False and (ty-ans[-1][1])%2==0 and (ty-ans[-1][1])<=2*k:
          break
      ans.append([tx,ans[-1][1]+k])
    if ans[-1][1]!=ty:
      td=ty-ans[-1][1]
      ans.append([tx+(k-td//2),ans[-1][1]+td//2])
      ans.append([tx,ty])
    ans.pop(0)
    n=len(ans)
  editarr(x,y,ans)
  print(n)
  for a,b in ans:
    print(a,b)
# -*-coding: utf-8

while True:
   a = map(int,raw_input().split())
   print('#'*a[1])
   for i in range(a[0]-2):
      b = a[1]-2
      print('#''*'*b'#')
   print('#'*a[1])
   if a == [0,0]
      break


### FIXED CODE ###

# -*- coding: utf-8

while True:
   a = map(int,raw_input().split())
   if a == [0,0]:
      break
   print('#'*a[1])
   for i in range(a[0]-2):
      b ='.'*(a[1]-2)
      print('#'+b+'#')
   print('#'*a[1])
   print('')
n, W = map(int, input().split())
w, v = [], []

for i in range(n):
    temp1, temp2 = map(int, input().split())
    w.append(temp1)
    v.append(temp2)

#print(w, v)
#dp[i] = max(dp[i-1], dp[i]) + dp[i-2]

def solve(total, i):
    if i > n-1:
	return 0
    weight, val = w[i], v[i]
    if total + weight <= W:
        chose = val + solve(total + weight, i+1)
        unchose = solve(total, i+1)
        return max(chose, unchose)
    else:
        return 0

print(solve(0, 0))

### FIXED CODE ###

n, W = map(int, input().split())
w = [0]*(n+1)
v = [0]*(n+1)

#dp = [[None for i in range(W+1)] for j in range(n+1)]
dp = [[0 for i in range(W+1)] for j in range(n+1)]

for i in range(n):
    w[i], v[i] = map(int, input().split())

def knap(i, j):
    if dp[i][j] is not None:
        return dp[i][j]

    res = 0

    if i == n:
       	res = 0
    elif j < w[i]:
        res = knap(i+1, j)
    else:
        res = max(knap(i+1, j), knap(i+1, j-w[i]) + v[i])

    dp[i][j] = res
    return dp[i][j]

for i in reversed(range(n)):
    for j in range(W+1):
#        res = 0
        # if i == n-1:
        #     res = 0
        if j < w[i]:
            dp[i][j] = dp[i+1][j]
        else:
            dp[i][j] = max(dp[i+1][j], dp[i+1][j-w[i]] + v[i])

#print(knap(0, W))
print(dp[0][W])
N, K = map(int, input().split())
h = list(map(int, input().split()))
c = [0]*N
for i in range(1, N):
    c[i] = min([c[j] + abs(h[i]-h[j]) for j in range(max(0, i-K), i)])
print(c[N-1])

### FIXED CODE ###

import sys

sys.setrecursionlimit(1000000)

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

memo = [10**10 for _ in range(N+1)]

def dp(i):
    if i == 1:
        return 0
    elif i == 2:
        memo[i] = abs(h[i-2]-h[i-1])
        return memo[i]
    elif memo[i] < 10**10:
        return memo[i]
    else:
        memo[i] = min(
            dp(i-1) + abs(h[i-2]-h[i-1]),
            dp(i-2) + abs(h[i-3]-h[i-1]),
            dp(i-2) + abs(h[i-3]-h[i-2]) + abs(h[i-2]-h[i-1])
        )
        return memo[i]
print(dp(N))
a,b=map(int.input().split())
print((a+b+1)//2)

### FIXED CODE ###

a,b=map(int,input().split())
print((a+b+1)//2)
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/

import math
import statistics

s = input()
ans = 0
for i in range(n):
  for j in range(i, n):
    if all('ACGT'.count(c) == 1 for c in S[i : j + 1]):
      ans = max(ans, j - i + 1)
print(ans)


### FIXED CODE ###

# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/

import math
import statistics

s = input()
length = 0
ans = 0
for ch in s:
    if ch in ('A','C','G','T'):
        length += 1
        ans = max(ans, length)
    else:
        length = 0
print(ans)
t,h=0,0
int(input())
for i in range(n):
    a,b=input().split()
    if a > b:
        h+=3
    elf a < b:
        t+=3
    else:
         t+=1
         h+=1
print(t, h)

### FIXED CODE ###

t,h=0,0
n=int(input())
for i in range(n):
    a,b=input().split()
    if a > b:
        t+=3
    elif a < b:
        h+=3
    else:
         t+=1
         h+=1
print(t, h)
# AOJ Circle in a Rctangle

def main() :
    W = input().split()[0]
    H = input().split()[1]
    x = input().split()[2]
    y = input().split()[3]
    r = input().split()[4]

    if ((x-r)>0) and ((x+r)<W) and ((y-r)>0) and ((y+r)<H) :
        print("Yes")
    else :
        print("No")

if __name__ == '__main__' :
    main()

### FIXED CODE ###

def main() :
    W, H, x, y, r = [int(i) for i in input().split()]

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

if __name__ == '__main__' :
    main()
a,b=map(int,input().split())
print(0--a//b)

### FIXED CODE ###

print(3*int(input())**2)
n = int(input())
a = list(map(int, input().split()))
q = int(input())
bc = [list(map(int, input().split())) for i in range(q)]

sumA = 0
num = [0]*100000
for aa in a:
    num[aa] += 1
    sumA += aa

for b, c in bc:
    if b < 100001 and c <100001:
        sumA = sumA + ((c - b) * num[b])
        num[c] += num[b]
        num[b] = 0
    print(sumA)


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
q = int(input())
bc = [list(map(int, input().split())) for i in range(q)]

sumA = 0
num = [0]*100100
for aa in a:
    num[aa] += 1
    sumA += aa

for b, c in bc:
    sumA = sumA + ((c - b) * num[b])
    num[c] += num[b]
    num[b] = 0
    print(sumA)
a,b = [int(i) for i in input().split()]
	for x in range(b-a+1,a+b):
		if x>=-1000000 and x<=1000000:
			print(x,end = " ")


### FIXED CODE ###

a,b = [int(i) for i in input().split()]
for x in range(b-a+1,a+b):
	if x>=-1000000 and x<=1000000:
		print(x,end = " ")
a, b = map(int, input().split())
if a == "H":
  print(b)
else:
  if b == "H":
    print("D")
  else:
    print("H")

### FIXED CODE ###

a, b = map(str, input().split())
if a == "H":
  print(b)
else:
  if b == "H":
    print("D")
  else:
    print("H")
N=int(input())
d={}
for i in list(map(int,input().split())):
    d[i]=d.get(i,0)+1
d=list(d.values())
if len(d)>=3:
    for j in range(len(d)-2):
        s=d[j]+d[j+1]+d[j+2]
        if s>ans:
            ans=s
else:
    ans=max(d)
print(ans)

### FIXED CODE ###

from collections import Counter
N=int(input())
s=[]
for i in list(map(int,input().split())):
    s+=[i-1,i,i+1]
s=Counter(s)
print(s.most_common(1)[0][1])
S = input()
N = len(S)
S1 = S[:(N-1)//2]
S2 = S[(N+3)//2]
print("Yes" if S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1] else "No")

### FIXED CODE ###

iss = lambda x:x == x[::-1]
S = input()
N = len(S)
S1 = S[:(N-1)//2]
S2 = S[(N+3)//2-1:]
print("Yes" if iss(S) and iss(S1) and iss(S2) else "No")
r, c = map(int, input().split())
a = [0]*(c+1)
for _ in range(r):
    v = list(map(int, input().split()))
    s = 0
    for i, e in enumerate(v):
        s+=e
        a[i]+=e
    print(*v, s)
    a[-1]+=s
print(*a)

### FIXED CODE ###

r, c = map(int, input().split())
a = [0]*(c+1)
for _ in range(r):
    v = list(map(int, input().split()))
    s = 0
    for i, e in enumerate(v):
        s+=e
        a[i]+=e
    v.append(s)
    print(*v)
    a[-1]+=s
print(*a)
a,b,c,d = input()
init = max(a,c)
term = min(b,d)
if term-init <= 0:
  print "0"
else:
  print (term-init)

### FIXED CODE ###

a,b,c,d = map(int, raw_input().split())
init = max(a,c)
term = min(b,d)
if term-init <= 0:
  print "0"
else:
  print (term-init)
alph = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXY'
n = int(input())
s = input()
ans = ''
for i in s:
        pos = alph.index(i)
        ans += alph[pos + n]
print(ans)

### FIXED CODE ###

alph = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
n = int(input())
s = input()
ans = ''
for i in s:
        pos = alph.index(i)
        ans += alph[pos + n]
print(ans)
N=int(input())
A=list(map(int,input().split()))
A.sort()
ma=A[-1]
dp=[1]*(ma+1)
ans=0

for i in range(len(A)-1):
  p=A[i]
  if dp[i]==1:
    for q in range(ma//p+1):
      dp[p*q]=0
    if A[i]!=A[i+1]:
      ans+=1
if dp[ma]==1:
  ans+=1
print(ans)


### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
A.sort()                  #エラトステネスの篩にかけるためソート
Amax = A[-1]
dp = [1]*(Amax+1)         #Aの最大値までのエラトステネスの篩を作る。
ans = 0
for i in range(len(A)-1):
  p = A[i]
  if dp[p] == 1:          #A[i]がA[j]の倍数でないかをエラトステネスの篩でチェック
    for q in range(Amax//p+1):
      dp[p*q] = 0         #A[i]の倍数をすべて0にする
    if A[i] != A[i+1]: 
      ans += 1            #A[i]が重複していなければカウント
if dp[Amax] == 1:         #重複チェック時にレンジオーバーするためAmaxだけ別で判定 
  ans += 1
print(ans)
s = sorted(list(str(input())))
t = sorted(list(str(input())), reverse = True)
x = 0
y = 0
for i in range(len(s)):
    if s[i] < t[i]:
        print('Yes')
        break
    if s[i] == t[i]:
        x += 1
    if x == len(s) and len(s) < len(t):
        print('Yes')
        break
    else:
        y += 1
if y == len(s):
    print('No')

### FIXED CODE ###

import sys
s = sorted(list(str(input())))
t = sorted(list(str(input())), reverse = True)
u = min(len(s), len(t))
for i in range(min(len(s), len(t))):
    if s[i] < t[i]:
        print('Yes')
        sys.exit()
    if s[i] > t[i]:
        print('No')
        sys.exit()
if s[0:u] == t[0:u] and len(s) < len(t):
    print('Yes')
elif s[0:u] == t[0:u] and len(s) >= len(t):
    print('No')
s=str(input())
list=[a,b,c]
S=[s[0],s[1],s[2]]
S.sort()
if S==list:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

s=str(input())
list=["a","b","c"]
S=[s[0],s[1],s[2]]
S.sort()
if S==list:
  print('Yes')
else:
  print('No')
import collections
n = int(input())
v = list(map(int,input().split()))
odd = collections.Counter(v[0::2]).most_common()
even= collections.Counter(v[1::2]).most_common()
if odd[0][0] != even[0][0]:
    print(n - odd[0][1] - even[0][1])
else:
    print(n - max(odd[0][1] + even[1][1], odd[1][1] + even[0][1]))

### FIXED CODE ###

import collections
n = int(input())
v = list(map(int,input().split()))
odd = collections.Counter(v[0::2]).most_common()
even = collections.Counter(v[1::2]).most_common()
odd.append((0, 0))
even.append((0, 0))
if odd[0][0] != even[0][0]:
    print(n - odd[0][1] - even[0][1])
else:
    print(n - max(odd[0][1] + even[1][1], odd[1][1] + even[0][1]))
c=input()

if c=='a' of c=='i' or c=='u' or c=='e' or c=='o':
  print('vowel')
else:
  print('consonant')

### FIXED CODE ###

c=input()
 
if c=='a' or c=='i' or c=='u' or c=='e' or c=='o':
  print('vowel')
else:
  print('consonant')
while True:
    if o==?:break
    a,o,b=map(input().split())
    int(a,b)
    print(aob)

### FIXED CODE ###

while True:
    a=input()
    if '?' in a:break
    print(int(eval(a)))
a,b=map(int,input().split())
printint((a+(b/2)))

### FIXED CODE ###

a,b=map(int,input().split())
print(int(a+(b/2)))
import sys
data = list(input())
for i, _str in enumerate(data):
  if _str == "?":
    if i == 0:
      if data[i + 1] == "D" or data[i + 1] == "?":
        data[i] = "P"
      else:
        data[i] = "D"
    elif i == len(data) - 1:
      if data[i - 1] == "D":
        data[i] = "P"
      else:
        data[i] = "D"
    else:
      if data[i - 1] == "D" or data[i + 1] == "D":
        data[i] = "P"
      else:
        data[i] = "D"
ans = "".join(data)
print(ans)

### FIXED CODE ###

import sys
data = list(input())
for i, _str in enumerate(data):
  if _str == "?":
    data[i] = "D"
ans = "".join(data)
print(ans)
a,b=map(int,input().split())
if a=='H':
  print(b)
  exit()
else:
  if b=='H':
    print('D')
  else:
    print('H')

### FIXED CODE ###

a,b=map(str,input().split())
if a=="H":
  print(b)
  exit()
else:
  if b=="H":
    print("D")
  else:
    print("H")
N = input()
ans = (N + 1) // 2
print(ans)

### FIXED CODE ###

N = input()
M = int(N)
jud = M % 2
if jud == 1:
    ans = M // 2 + 1
else:
    ans = M // 2
print(ans)
import math
aa=int(input())
N=[0 for i in range(aa)]
for i in range(aa):
  bb=input()
  #print(b)
  N[i]=bb.split()


def so(p,q):
  while p!=q:
    if p>q:
      p-=q
    else:
      q-=p
  return p


#print(so(11,5))

def aaa(n):

  a=int(N[n][0])
  b=int(N[n][1])
  c=int(N[n][2])
  d=int(N[n][3])

  e=a-a//b*b
  f=d-d//b*b
  
  if e*f>0 :
    s=gcd(e,f)
  else :
    s=f


  if a<b or d<b :
    return "No"
  
  elif b<=c :
    return "Yes"
  else:
  
    if f!=0 :
      ss=b//s*s
      if ss==b:
        ss-=s

      if ss>c:
        return "No"
          
    

        #print(e)
        #print(f)
  #print("while")
    else:
      if e>c :
        return "No"

  return "Yes"

for i in range(aa):
  print(aaa(i))


### FIXED CODE ###

import sys
input = sys.stdin.readline

n = int(input())
C = [list(map(int,input().split())) for i in range(n)]

from fractions import gcd

for i in range(n):
    a = C[i][0]
    b = C[i][1]
    c = C[i][2]
    d = C[i][3]
    ng = 0

    e = 0  # 最初に補充が発生する直前の本数
    e0 = a - b
    e1 = ((c - a%b) // b) * b + a%b
    e = min(e0, e1)

    if e < 0 or b > d:
        ng = 1
    else:
        g = gcd(b, d)
        # print(c+1, b-1, g)
        if c+1 <= b-1 and (c - e) // g < (b-1 - e) // g:
            ng = 1

    if ng == 1:
        print("No")
    else:
        print("Yes")
import math

def main():
    inputs = input().split()
    inputs = [int(i) for i in inputs]

    a = inputs[0]
    b = inputs[1]

    g = gcd(a, b)
    d = {}

    min_n = min([a, b])

    for i in range(2, int(math.sqrt(min_n + 1))):
        while True:
            if g % i == 0:
                g /= i
                d[i] = i
            else:
                break

    print(len(d) + 1)

def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x % y)

if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    n = int(input())

    if n % 2 == 0:
        print(0.5)
    else:
        print(float(int(n / 2)+1) / n)

if __name__ == "__main__":
    main()
h_deg = (minutes  / (12 * 60)) * 2 * math.pi
m_deg = (minutes  / 60) * 2 * math.pi
h_x = a * math.cos(h_deg)
h_y = a * math.sin(h_deg)
m_x = b * math.cos(m_deg)
m_y = b * math.sin(m_deg)
print(math.sqrt((h_x - m_x) * (h_x - m_x) + (h_y - m_y) * (h_y - m_y)))


### FIXED CODE ###

import math

(a, b, h, m) = tuple(map(int, input().split()))
minutes = h * 60 + m
h_deg = (minutes  / (12 * 60)) * 2 * math.pi
m_deg = (minutes  / 60) * 2 * math.pi
h_x = a * math.cos(h_deg)
h_y = a * math.sin(h_deg)
m_x = b * math.cos(m_deg)
m_y = b * math.sin(m_deg)
print(math.sqrt((h_x - m_x) * (h_x - m_x) + (h_y - m_y) * (h_y - m_y)))