Harryxun/stf_run huggingface dataset:
import operator

def snuke_fest(top_arr, middle_arr, bottom_arr):
    sorted_arrs = list(sorted(arr) for arr in (top_arr, middle_arr, bottom_arr))
    pointers = [0] * 3
    ended = [False] * 3
    min_posi = [None] * len(top_arr) * 3
    min_posi_pointer = 0
    while not all(ended):
        nums = [0] * 3
        mins = [10**9] * 3
        for i in range(3):
            if not ended[i]:
                mins[-(i+1)] = sorted_arrs[i][pointers[i]]
        min_index, min_val = min(enumerate(mins), key = operator.itemgetter(1))
        min_index = 2 - min_index
        pointers[min_index] += 1
        min_posi[min_posi_pointer] = min_index
        min_posi_pointer += 1
        if pointers[min_index] == len(top_arr):
            ended[min_index] = True
    del sorted_arrs
    del pointers
    count = 0
    count_arr = [0, 0, 0]
    count_one_two = 0
    for i in range(len(min_posi)):
        count_arr[min_posi[-(i+1)]] += 1
        if min_posi[-(i+1)] == 1:
            count_one_two += count_arr[2]
        elif min_posi[-(i+1)] == 0:
            count += count_one_two
    return count


if __name__ == "__main__":
    # run_test(find_even, test_pair)
    _ = input()
    top_arr = [int(i) for i in input().split(" ")]
    middle_arr = [int(i) for i in input().split(" ")]
    bottom_arr = [int(i) for i in input().split(" ")]
    print(snuke_fest(top_arr, middle_arr, bottom_arr))

### FIXED CODE ###


import operator

def snuke_fest(top_arr, middle_arr, bottom_arr):
    sorted_arrs = list(sorted(arr) for arr in (top_arr, middle_arr, bottom_arr))
    del top_arr
    del middle_arr
    del bottom_arr
    pointers = [0] * 3
    ended = [False] * 3
    min_posi = [None] * len(sorted_arrs[0]) * 3
    min_posi_pointer = 0
    try:
        while not all(ended):
            nums = [0] * 3
            mins = [10**9] * 3
            for i in range(3):
                if not ended[i]:
                    mins[-(i+1)] = sorted_arrs[i][pointers[i]]
            min_index, min_val = min(enumerate(mins), key = operator.itemgetter(1))
            min_index = 2 - min_index
            pointers[min_index] += 1
            min_posi[min_posi_pointer] = min_index
            min_posi_pointer += 1
            if pointers[min_index] == len(sorted_arrs[0]):
                ended[min_index] = True
    except Exception as e:
        return 0
    del sorted_arrs
    del pointers
    count = 0
    count_arr = [0, 0, 0]
    count_one_two = 0
    for i in range(len(min_posi)):
        count_arr[min_posi[-(i+1)]] += 1

        if min_posi[-(i+1)] == 1:
            count_one_two += count_arr[2]
        elif min_posi[-(i+1)] == 0:
            count += count_one_two
    return count


if __name__ == "__main__":
    # run_test(find_even, test_pair)
    _ = input()
    top_arr = [int(i) for i in input().split(" ")]
    middle_arr = [int(i) for i in input().split(" ")]
    bottom_arr = [int(i) for i in input().split(" ")]
    print(snuke_fest(top_arr, middle_arr, bottom_arr))
import collections
N=int(input())
l=list(map(lambda x:int(x),input().split(' ')))
l=[l[i]-(i+1) for i in range(N)]
dl=collections.Counter(l)
ans=[0]*(len(dl)//2)
for i in range(len(dl)//2):
    k=dl.most_common()[i][0] 
    k*=-1
    ans[i]=sum([abs(l[j]+k) for j in range(N)])
print(min(ans))

### FIXED CODE ###

d=int(input())
if d%2==0:
    print(d)
else:
    print(2*d)
def floorsqrt(x):
  max_ok = 0
  min_ng = x
  while min_ng-max_ok>1:
    tgt = (max_ok+min_ng)//2
    if tgt*tgt<=x:
      max_ok = tgt
    else:
      min_ng = tgt
  return max_ok

def K1(C, r):
  max_ok = 0
  min_ng = C
  while min_ng-max_ok>1:
    tgt = (max_ok+min_ng)//2
    if C-tgt>r+tgt*tgt:
      max_ok = tgt
    else:
      min_ng = tgt
  return max_ok

def K2(C, r):
  max_ok = 0
  min_ng = C
  while min_ng-max_ok>1:
    tgt = (max_ok+min_ng)//2
    if C-tgt>r+tgt*(tgt+1):
      max_ok = tgt
    else:
      min_ng = tgt
  return max_ok

Q = int(input())
for _ in range(Q):
  A, B = map(int, input().split())
  if A*B==1:
    print(0)
    continue
  
  if B<A: A,B = B,A
  
  C = floorsqrt(A*B-1)
  #print(A, B, C, C*C, A*B-1, C*C+2*C+1)
  
  # C:= floor(sqrt(AB-1))
  
  q = (A*B-1)//C
  r = (A*B-1)%C

  if q==C:
    # Case 1: (AB-1)//C == C ... r
    # a :    1 ... C     AB-1
    # b : AB-1     C ...    1
    #
    # (AB-1)//(C-k) == C+k ... r+k*k
    # K = max{k | C-k>r+k*k}
    K = K1(C, r)
    ans = 2*C-3 if B<=C+K else 2*C-2
    #print(K, B, C+K)
  
  elif q==C+1:
    # Case 2: (AB-1)//C == C+1 ... r
    # a :    1 ... C   C+1     AB-1
    # b : AB-1     C+1   C...     1
    #
    # (AB-1)//(C-k) == C+k+1 ... r+k*(k+1)
    # K = max{k | C-k>r+k*(k+1)}
    K = K2(C, r)
    ans = 2*C-2 if B<=C+K+1 else 2*C-1
 
  else:
    # Case 3: (AB-1)//C == C+2
    # a :    1 ... C   C+2     AB-1
    # b : AB-1     C+2   C...     1
    ans = 2*C if A==B else 2*C-1
    
  print(ans)

### FIXED CODE ###

def floorsqrt(x):
  max_ok = 0
  min_ng = x+1
  while min_ng-max_ok>1:
    tgt = (max_ok+min_ng)//2
    if tgt*tgt<=x:
      max_ok = tgt
    else:
      min_ng = tgt
  return max_ok

def K1(C, r):
  max_ok = 0
  min_ng = C
  while min_ng-max_ok>1:
    tgt = (max_ok+min_ng)//2
    if C-tgt>r+tgt*tgt:
      max_ok = tgt
    else:
      min_ng = tgt
  return max_ok

def K2(C, r):
  max_ok = 0
  min_ng = C
  while min_ng-max_ok>1:
    tgt = (max_ok+min_ng)//2
    if C-tgt>r+tgt*(tgt+1):
      max_ok = tgt
    else:
      min_ng = tgt
  return max_ok

Q = int(input())
for _ in range(Q):
  A, B = map(int, input().split())
  if A*B==1:
    print(0)
    continue
  if B<A: A,B = B,A
  
  C = floorsqrt(A*B-1)
  #print(A, B, C, C*C, A*B-1, C*C+2*C+1)
  
  # C:= floor(sqrt(AB-1))
  
  q = (A*B-1)//C
  r = (A*B-1)%C

  if q==C:
    # Case 1: (AB-1)//C == C ... r
    # a :    1 ... C     AB-1
    # b : AB-1     C ...    1
    #
    # (AB-1)//(C-k) == C+k ... r+k*k
    # K = max{k | C-k>r+k*k}
    K = K1(C, r)
    ans = 2*C-3 if B<=C+K else 2*C-2
    #print(K, B, C+K)
  
  elif q==C+1:
    # Case 2: (AB-1)//C == C+1 ... r
    # a :    1 ... C   C+1     AB-1
    # b : AB-1     C+1   C...     1
    #
    # (AB-1)//(C-k) == C+k+1 ... r+k*(k+1)
    # K = max{k | C-k>r+k*(k+1)}
    K = K2(C, r)
    ans = 2*C-2 if B<=C+K+1 else 2*C-1
 
  else:
    # Case 3: (AB-1)//C == C+2
    # a :    1 ... C   C+2     AB-1
    # b : AB-1     C+2   C...     1
    ans = 2*C if A==B else 2*C-1
    
  print(ans)
def c_multiple_clocks(N, T):
    from fractions import gcd
    from functools import reduce
    return reduce(lambda a, b: (a * b) // gcd(a, b), T)

N = int(input())
T = [int(input()) for _ in range(N)]
print(c_multiple_Clocks(N, T))

### FIXED CODE ###

def Q3(x):
    def gcd(a, b):
        if b > a:
            a, b = b, a
        while b > 0:
            a, b = b, a % b
        return a

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

    N = x[0]
    lst = x[1:]
    if N == 1:
        return lst[0]
    else:
        l = lcm(lst[0], lst[1])
        for x in lst:
            l = lcm(l, x)
        return l

n = int(input())
t = [int(input()) for i in range(n)]
t.insert(0,n)
print(Q3(t))
input()
A=list(map(int,input().split())
ans=0
while all(a%2==0 for a in A):
    A=[a/2 for a in A]
    ans+=1
print(ans)

### FIXED CODE ###

input()
A=list(map(int,input().split()))
ans=0
while all(a%2==0 for a in A):
    A=[a/2 for a in A]
    ans+=1
print(ans)
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import bisect

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

def LI(): return list(map(int, sys.stdin.readline().split()))

N = int(input())
A = LI()
B = LI()

A_c = copy.deepcopy(A)

A.sort()
B.sort()

for i in range(N):
    if A[i] > B[i]:
        print("No")
        sys.exit(0)

for i in range(1,N):
    if A[i] < B[i-1]:
        print("Yes"):
        sys.exit(0)


# ans = "Yes"
# for i in range(N):
#     if A[i] <= B[i]:
#         pass
#     else:
#         ans = "No"
#         break

if True:
    si2i = sorted(range(len(A_c)), key=lambda x:A_c[x])
    a = 0
    count = 0
    while True:
        a = si2i[a]
        if a == 0:
            break
        count += 1

    if count <= N - 2:
        pass
    else:
        ans = "No"


### FIXED CODE ###

import sys; readline = sys.stdin.readline
from collections import deque
from collections import Counter
 
N = int(readline())
A = list(map(int, readline().split()))
B = list(map(int, readline().split()))
 
A, B = zip(*sorted(zip(A, B), key=lambda x:x[1]))
 
A_s = sorted(A)
B_s = sorted(B)
 
no = "No"
yes = "Yes"
 
for i in range(len(A_s)):
    if A_s[i] > B_s[i]:
        print(no)
        exit(0)
 
for i in range(1, len(A_s)):
    if A_s[i] < B_s[i - 1]:
        print(yes)
        exit(0)
 
si2i = sorted(range(len(A)), key=lambda x:A[x])
 
a = 0
count = 0
while True:
    a = si2i[a]
    if a == 0:
        break
    count += 1
 
if count <= N - 2:
    print(yes)
else:
    print(no)
import math
a,b,c,d=map(int,input().split())
c-=a
d-=b
g=math.gcd(max(c,d),min(c,d))
j=int(c/g)
k=int(d/g)
print((j+k-1)*g)

### FIXED CODE ###

def gcd(a,b):
	if b==0:return a
	return gcd(b,a%b)
a,b,c,d=map(int,input().split())
c=abs(c-a)
d=abs(d-b)
g=gcd(max(c,d),min(c,d))
j=int(c/g)
k=int(d/g)
print((j+k-1)*g)
H,W,M = map(int,input().split())
h = []
w = []

for i in range(M):
    tmp1,tmp2 = map(int,input().split())
    h.append(tmp1)
    w.append(tmp2)

dic1 = {}
dic2 = {}

for i in h:
    if i not in dic1:
        dic1[i] = 1
    else:
        dic1[i] +=1

val1 = max(dic1,key=dic1.get)
ans = 0
ans +=dic1[val1]
for j in range(M):
    if h[j] != val1:
        if w[j] not in dic2:
            dic2[w[j]] = 1
        else:
            dic2[w[j]] +=1

val2 = max(dic2,key=dic2.get)
ans +=dic2[val2]
print(ans)

### FIXED CODE ###

H,W,M = map(int,input().split())
h = []
w = []

for i in range(M):
    tmp1,tmp2 = map(int,input().split())
    h.append(tmp1)
    w.append(tmp2)

dic1 = {}
dic2 = {}

for i in h:
    if i not in dic1:
        dic1[i] = 1
    else:
        dic1[i] +=1

val1 = max(dic1,key=dic1.get)
ans = 0
ans +=dic1[val1]
for j in range(M):
    if h[j] != val1:
        if w[j] not in dic2:
            dic2[w[j]] = 1
        else:
            dic2[w[j]] +=1
if dic2:
    val2 = max(dic2,key=dic2.get)
    ans +=dic2[val2]


dic1 = {}
dic2 = {}

for i in w:
    if i not in dic1:
        dic1[i] = 1
    else:
        dic1[i] +=1
val1 = max(dic1,key=dic1.get)
ans1 = 0
ans1 +=dic1[val1]
for j in range(M):
    if w[j] != val1:
        if h[j] not in dic2:
            dic2[h[j]] = 1
        else:
            dic2[h[j]] +=1
if dic2:
    val2 = max(dic2,key=dic2.get)
    ans1 +=dic2[val2]
print(max(ans,ans1))
import time
import random
N = int(input())
s = str(input())
maxlen = N//2
start = time.time()
def solve(tgt):
    for i in range(N-tgt*2+1):
        if s[i:i+tgt] in s[i+tgt:]:
            return True
    return False

ng = maxlen + 1
ok = 0
if N>650:
    ok = 2
first = 1
while ng-ok > 1:
    end = time.time()
    if end-start > 1.2:
        if ok >= 2499:
            assert()
        r = random.random.randint(ok,ng-1)
        print(r)
        exit()
    tgt = (ok+ng)//2
    if N>=5000 and first == 1:
        tgt = 2500
        first = 0
    if solve(tgt):
        ok = tgt
    else:
        ng = tgt
print(ok)


### FIXED CODE ###

from collections import defaultdict as dd
N = int(input())
s = str(input())
maxlen = N//2

def solve(tgt):
    dic = dd(int)
    st = s[tgt:2*tgt]
    dic[st] += 1
    ls = [st]
    for char in s[2*tgt:]:
        st = st[1:]+char
        dic[st] += 1
        ls.append(st)
    st = s[:tgt]
    if dic[st] > 0:
        return True
    dic[ls[0]] -= 1
    for i,char in enumerate(s[tgt:N-tgt]):
        st = st[1:]+char
        if dic[st] > 0:
            return True
        dic[ls[i+1]] -= 1
    return False

ng = maxlen + 1
ok = 0
while ng-ok > 1:
    tgt = (ok+ng)//2
    if solve(tgt):
        ok = tgt
    else:
        ng = tgt
print(ok)
def f(x):
    p=0
    cnt=0
    for i in range(n-1,-1,-1):
        while p<n and a[i]+a[p]<x:
            p+=1
        cnt+=n-p
    return cnt

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

l,r=a[0]*2,a[n-1]*2

while r-l>0:
    if r-l<=1: md=l;break
    md=(r+l)//2
    k=f(md)
    if k==m: break
    elif k>m: l=md
    else: r=md

p=0
cnt=0
ans=0
for i in range(n-1,-1,-1):
    while p<n and a[i]+a[p]<=md:
        p+=1
    cnt+=n-p
    ans+=a[i]*(n-p)*2


ans+=(m-cnt)*md
print(ans)

### FIXED CODE ###

import sys

def f(x):
    p=0
    cnt=0
    for i in range(n-1,-1,-1):
        while p<n and a[i]+a[p]<x:
            p+=1
        cnt+=n-p
    return cnt

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

l,r=a[0]*2,a[n-1]*2
md=(r+l)//2
while r-l>0:
    if r-l<=1:
        if f(r)==m: md=r;break 
        else: md=l;break
    md=(r+l)//2
    k=f(md)
    if k==m: break
    elif k>m: l=md
    else: r=md

p=0
cnt=0
ans=0

for q in range(n-1,-1,-1):
    try:
        while p<n and a[q]+a[p]<=md:
            p+=1
    except:
        b=1
        while True:
            b+=1

    if p==n: break
    cnt+=n-p
    ans+=a[q]*(n-p)*2


ans+=(m-cnt)*md
print(ans)
import math

def P(n, r):
    return math.factorial(n)//math.factorial(n-r)

def C(n, r):
    return P(n, r)//math.factorial(r)

N = int(input())
arr = {}
ans = 0
for _ in range(N):
    S = input()
    tmp_arr = []
    for i in range(10):
        tmp_arr.append(S[i])
    tmp_arr.sort()
    moji_sorted = ''
    for i in tmp_arr:
        moji_sorted += i
    if moji_sorted in arr:
        arr[moji_sorted] += 1
    else:
        arr[moji_sorted] = 1
# print(arr)

for i in arr.values():
    ans += C(i,2)

print(ans)





### FIXED CODE ###

import math

def P(n, r):
    return math.factorial(n)//math.factorial(n-r)

def C(n, r):
    return P(n, r)//math.factorial(r)

N = int(input())
arr = {}
ans = 0
for _ in range(N):
    S = input()
    tmp_arr = []
    for i in range(10):
        tmp_arr.append(S[i])
    tmp_arr.sort()
    moji_sorted = ''
    for i in tmp_arr:
        moji_sorted += i
    if moji_sorted in arr:
        arr[moji_sorted] += 1
    else:
        arr[moji_sorted] = 1
# print(arr)

for i in arr.values():
    if i-2 >= 0:
        ans += C(i,2)

print(ans)
a,s,c=str(input().split())
print(f'{a[0]}{s[0]}{c[0]}')

### FIXED CODE ###

a,s,c=input().split()
print(a[0]+s[0]+c[0])
x = int(input())
flag = False
a = 0

while flag == False:
    if x - a**5 <= 0:
        b_sub = pow(x - a**5,1/5)
    else:
        b_sub = (-1)*pow(x - a**5,1/5)
    if b_sub.is_integer():
        flag = True
        print(a,int(b_sub))
    a += 1

### FIXED CODE ###

import sys

x = int(input())
flag = False
a = 0

while True:
    for b in range(-a+1,a):
        if  a ** 5 - b  ** 5 == x:
            print(a,int(b))
            sys.exit()
    a += 1
N = int(input())
A = 0
for i in range(N):
    A = A + 1 / input()
return A

print(1 / A)


### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
ph = []
p =  1
for i in range(N):
    p *= A[i]
for i in range(N):
    ph.append(p / A[i])
ph_sum = sum(ph)
print(p / ph_sum)
N = int(input())

B = list(map(int, input().split()))
B.append(max(B[0], B[-1]))

ans = 0
for i in range(N):
    ans += min(B[i], B[i - 1])

print(ans)


### FIXED CODE ###

N, K = map(int, input().split())
S = input()
T = []

g = S[0]
cnt = 0
for s in S:
    if s == g:
        cnt += 1
    else:
        T.append(cnt)
        cnt = 1
        g = s
else:
    T.append(cnt)


t = len(T)
for k in range(K):
    t -= 2

if t <= 1:
    print(N - 1)
else:
    print(N - t)
a=0
S=int(input())
for i in range(N-3):
  for j in range(i+3,N+1):
    A=int(float(S[i:j+1]))
    if A%2019==0:
      a=a+1
print(a)

### FIXED CODE ###

ans=0
S=input()
a=len(S)
k=0
c=dict()
mod=2019
s=1
c[0]=1
for i in range(a):
  k+=(s*int(S[a-i-1]))
  k%=mod
  s*=10
  s%=mod
  if k in c:
    c[k]+=1
  else:
    c[k]=1
for i in c:
  ans+=c[i]*(c[i]-1)//2
print(ans)
n,y=map(int,input().split())
ans=[-1,-1,-1]
for i in range(n+1):
  for j in range(n-i+1):
    if y-10000＊i-5000＊j==1000＊(n-i-j):
      ans=[i,j,n-i-j]
      print(ans[1],ans[2],ans[3])
      exit()
print(ans[1],ans[2],ans[3])

### FIXED CODE ###

n,y=map(int,input().split())
ans=[-1,-1,-1]
for i in range(n+1):
  for j in range(n-i+1):
    if y-10000*i-5000*j==1000*(n-i-j):
      ans=[i,j,n-i-j]
      print(ans[0],ans[1],ans[2])
      exit()
print(ans[0],ans[1],ans[2])
a,b=input().split();print(eval(a/b+a%b)

### FIXED CODE ###

a=eval(input().replace(' ', '+'));print(a//2+a%2)
if s == s[::-1]:
  #前半部分の回文チェック
  p = int((n-1)/2)
  f = s[:p]
  if f == f[::-1]:
    #後半部分の回文チェック
    q = int((n+3)/2)
    l = s[q-1:]
    if l == l[::-1]:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
else:
  print("No")

### FIXED CODE ###

s = input()
n = len(s)

if s == s[::-1]:
  #前半部分の回文チェック
  p = int((n-1)/2)
  f = s[:p]
  if f == f[::-1]:
    #後半部分の回文チェック
    q = int((n+3)/2)
    l = s[q-1:]
    if l == l[::-1]:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
else:
  print("No")
mport itertools
def main():
    N, M, Q = map(int, input().split())
    abcd = []
    for _ in range(Q):
        a, b, c, d = map(int, input().split())
        abcd.append((a-1, b-1, c, d))
    score = 0
    for ones in list(itertools.combinations([i for i in range(N+M-1)], M-1)):
        temp = [0] * (N + M -1)
        for idx in ones:
            temp[idx] = 1
        A = [0] * N
        idx = 0
        sum_ = 0
        for i in temp:
            if i == 0:
                A[idx] = sum_ + 1
                idx += 1
            else:
                sum_ += 1
        score_temp = get_score(A, abcd)
        if score_temp > score:
            score = score_temp
    print(score)
            

def get_score(A, abcd):
    score = 0
    for a, b, c, d in abcd:
        if A[b] - A[a] == c:
            score += d
    return score

if __name__ == '__main__':
    main()

### FIXED CODE ###

import itertools
def main():
    N, M, Q = map(int, input().split())
    abcd = []
    for _ in range(Q):
        a, b, c, d = map(int, input().split())
        abcd.append((a-1, b-1, c, d))
    score = 0
    for ones in list(itertools.combinations([i for i in range(N+M-1)], M-1)):
        temp = [0] * (N + M -1)
        for idx in ones:
            temp[idx] = 1
        A = [0] * N
        idx = 0
        sum_ = 0
        for i in temp:
            if i == 0:
                A[idx] = sum_ + 1
                idx += 1
            else:
                sum_ += 1
        score_temp = get_score(A, abcd)
        if score_temp > score:
            score = score_temp
    print(score)
            
def get_score(A, abcd):
    score = 0
    for a, b, c, d in abcd:
        if A[b] - A[a] == c:
            score += d
    return score

if __name__ == '__main__':
    main()
h, w, n = map(int,input().split())
cell = [[0]*w for _ in range(h)]
for _ in range(n):
    a, b = map(int,input().split())
    for i in range(3):
        for j in range(3):
            if a-i>=0 and b-j>=0:
                cell[a-i-1][b-j-1] += 1
            else:
                continue

ans = [0]*10

for i in range(h-2):
    for j in range(w-2):
        s = cell[i][j]
        ans[s] += 1

for i in ans:
    print(i)

### FIXED CODE ###

h, w, n = map(int,input().split())
 
xy_pos = dict()
 
for i in range(n):
    a, b = map(int, input().split())
    for k in range(-2,1):
        for l in range(-2,1):
            x = (a-1) + k
            y = (b-1) + l
            if (0 <= x <= h-3 and 0 <= y <= w-3):
                xy = str(x) + "x" + str(y)
                if xy in xy_pos:
                    xy_pos[xy] += 1
                else:
                    xy_pos[xy] = 1
 
ans = [0]*10                    
for v in xy_pos.values():
    ans[v] += 1
ans[0] = (h-2)*(w-2) - sum(ans)
for i in range(10):
    print(ans[i])
x,y=map(int,input().split())
G=121313113131
print(["No","Yes"][G[x-1]==G[y-1]])

### FIXED CODE ###

x,y=map(int,input().split())
s1={1,3,5,7,8,10,12}
s2={4,6,9,11}
print(["No","Yes"][(x in s1 and y in s1) or (x in s2 and y in s2)])
s,t=str(input(),split())
a,b=int(input(),split())
u=str(input())
if u==s:
  a-=1
else:
  b-=1
print(a,b)

### FIXED CODE ###

S,T=input().split()
A,B=map(int,input().split())
U=input()
if S==U:
    A-=1
else:
    B-=1
print(A,B)
s=map(int,input().split())
if len(s)==2:c=s[0];d=s[1]
else:c=s[0];d=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
e=0;i=0
while i<d-e:
    p=i;q=0
    for j in range(c):
        if a[j]==b[p]:q+=1;p+=1
    e=max(e,q)
    i+=1
print(e)

### FIXED CODE ###

s=list(map(int,input().split()))
if len(s)>1:c=s[0];d=s[1]
else:c=s[0];d=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
e=0;i=0
while i<d-e:
    p=i;q=0
    for j in range(c):
        if a[j]==b[p]:q+=1;p+=1
    e=max(e,q)
    i+=1
print(e)
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = [0]
d = [0]
for i in range(n):
    c.append(a[i]+c[i])
for i in range(m):
    d.append(b[i]+d[i])
e = 0
for i in range(n+1):
    if a[i] > k:
        break;
    while b[m] > k-a[i]:
        m -= 1
    e = max(e, i+m)
print(e)

### FIXED CODE ###

n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = [0]
d = [0]
for i in range(n):
    c.append(a[i]+c[i])
for i in range(m):
    d.append(b[i]+d[i])
e = 0
for i in range(n+1):
    if c[i] > k:
        break;
    while c[i]+d[m] > k:
        m -= 1
    e = max(e, i+m)
print(e)
def f(s, i, d):
  if len(s) == i:
    d.sort()
    return d[0]
  if len(d) == 0:
    return "_"
  d.remove(s[i])
  r = f(s, i+1, d)
  if r == "_":
    d.sort()
    for i in d:
      if s[i] < i:
        return i
    d.append(s[i])
    return "_"
  return "".join(s[i], r)

def main():
  d = list("abcdefghijklmnopqrstuvwxyz")
  t = input()
  r = f(t, 0, d)
  print(r)
  
main()

### FIXED CODE ###

def f(s, i, d):
  if len(d) == 0:
    return "-1"
  if len(s) == i:
    d.sort()
    return d[0]
  d.remove(s[i])
  r = f(s, i+1, d)
  if r == "-1":
    d.sort()
    for j in d:
      if s[i] < j:
        return j
    d.append(s[i])
    return "-1"
  return "".join([s[i], r])

def main():
  d = list("abcdefghijklmnopqrstuvwxyz")
  t = input()
  r = f(t, 0, d)
  print(r)

main()
T, X = list(map(int, input().split())
print(T / X)

### FIXED CODE ###

T, X = list(map(int, input().split()))
print(T / X)