Harryxun/stf_run huggingface dataset:
s = input()
t = input()

dp = ['']* len(t)
# dp_len = [0]* len(t)

for i in range(len(s)):
    s_temp = s[i]
    temp_max = ''
    for j in range(0, len(t)):
        if(s_temp == t[j]):
            dp_temp = temp_max + s_temp
            print(dp_temp)
        else:
            dp_temp = dp[j]

        if( len(dp[j]) > len(temp_max)):
            temp_max = dp[j]
        dp[j] = dp_temp

if( len(dp_temp) > len(temp_max)):
    temp_max = dp_temp

print(temp_max)

### FIXED CODE ###

s = input()
t = input()

s_len = len(s)
t_len = len(t)

dp = [[0] * (t_len+1) for _ in range(s_len+1)]

for i in range(1,s_len+1):
    s_temp = s[i-1]
    for j in range(1, t_len+1):
        if(s_temp == t[j-1]):
            dp[i][j] = max(dp[i-1][j], dp[i][j-1], dp[i-1][j-1] + 1)
        else:
            dp[i][j] = max(dp[i-1][j], dp[i][j-1])

ans = ''
while(s_len > 0 and t_len > 0):
    if(dp[s_len][t_len] == dp[s_len-1][t_len]):
        s_len -= 1
    elif(dp[s_len][t_len] == dp[s_len][t_len-1]):
        t_len -= 1
    else:
        ans = s[s_len-1]  + ans
        s_len -= 1
        t_len -= 1

print(ans)
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

li = [ri() for _ in range(5)]
lis = [math.ceil(i/10)*10 for i in li]
ans = inf
for i in range(5):
  ans = min(sum(lis[:i])+li[i]+sum(lis[i+1:]))
print(ans)
  
    










### FIXED CODE ###

import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

li = [ri() for _ in range(5)]
lis = [math.ceil(i/10)*10 for i in li]
ans = inf
for i in range(5):
  ans = min(sum(lis[:i])+li[i]+sum(lis[i+1:]), ans)
print(ans)
N = int(input())
V = list(map(int, input().split()))
alist = []
tmp = 0

def cook(N, V, alist, tmp):
    if N = 1:
        print(V[0])
    
    else:
        V.sort()
        for i in range(0, N, 2):
            if i + 1 > N - 1:
                alist.append(V[i])
                
            else:
                tmp = (V[i] + V[i +1]) / 2
                alist.append(tmp)
            
    N = len(alist)
    V = alist
    alist = []
    tmp = 0
    cook(N, V, alist, tmp)
        
cook(N, V, alist, tmp)

### FIXED CODE ###

N = int(input())
v = list(map(float, input().split()))

v.sort()

r = v[0]

for i in v[1::]:
    r = (r + i) / 2

print(r)
n,C=[int(i) for i in input().split()]
stc=[[int(i) for i in input().split()] for _ in range(n)]
stc.sort(key=lambda x:x[1])
stc.sort(key=lambda x:x[2])
time=[0]*(2*(10**5+1))
end=[[0]*(10**5) for _ in range(C)]

for s,t,c in stc:
    end[c-1][t]+=1

for s,t,c in stc:
    if end[c-1][s]==0:
        time[2*s-1]+=1
    time[2*t]-=1
for i in range(1,2*10**5+2):
    time[i]=time[i-1]+time[i]
print(max(time))

### FIXED CODE ###

n,C=[int(i) for i in input().split()]
stc=[[int(i) for i in input().split()] for _ in range(n)]
time=[0]*(2*(10**5+1))
end=[[0]*(10**5+1) for _ in range(C)]   #チャンネル別の終わりの記録

for s,t,c in stc:
    end[c-1][t]+=1

for s,t,c in stc:
    if end[c-1][s]==0:
        time[2*s-1]+=1
    else:
        time[2*s]+=1
    time[2*t]-=1

for i in range(1,2*10**5+2):
    time[i]+=time[i-1]
print(max(time))
A = int(input())
B = int(input())
C = int(input())
X = int(input())
count = 0
for a in range(A + 1):
    for b in range(B + 1):
        fo c in range(C + 1):
        if X == 500 * a + 100 * b +50 * c:
            count = count + 1
print(count)

### FIXED CODE ###

A = int(input())
B = int(input())
C = int(input())
X = int(input())
count = 0
for a in range(A + 1):
    for b in range(B + 1):
        for c in range(C + 1):
            if X == 500 * a + 100 * b + 50 * c:
                count = count + 1
print(count)
N = int(input())
H = list(map(int, input().split()))

result = 0
for i in range(0, N)
    if maxi != 0:
        maxi -= 1
        break
    for j in range(i, N - 1):
        if H[j] >= H[j + 1]:
            tempres += 1
        else:
            break
    result = max(result, tempres)
    maxi = i
    if result >= N - i - 1:
        break
print(result)


### FIXED CODE ###

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

result = 0
tempres = 0
for i in range(0, N):
    if tempres != 0:
        tempres -= 1
        continue
    for j in range(i, N - 1):
        if H[j] >= H[j + 1]:
            tempres += 1
        else:
            break
    result = max(result, tempres)
    if result >= N - i - 1:
        break
print(result)
N,K=map(int,(input().split()))
TO=list(map(int,input().split()))

visit_flag=[[0]*2 for i in [1]*N]
visit_count=0
first_visit=0
last_visit=0
next_town=1
visit_flag[0][0]=1
visit_flag[0][1]=1

for i in range(K):
    visit_count+=1
    next_town = TO[next_town-1]
    if visit_flag[next_town-1][0]==0:
        visit_flag[next_town-1][0]=1
        visit_flag[next_town-1][1]=visit_count
    else:
        first_visit=visit_flag[next_town-1][1]
        last_visit=visit_count
        break

roop=last_visit-first_visit

if K<=roop:
    next_town = 1
    for i in range(K):     
        next_town = TO[next_town-1]
    ans=next_town
else:
    for i in range((K-roop+1)%roop):
        next_town = TO[next_town-1]
    ans=next_town

print(ans)

### FIXED CODE ###

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

visit_flag=[[0]*2 for i in [1]*N]
visit_count=0
first_visit=0
last_visit=0
next_town=1
visit_flag[0][0]=1
visit_flag[0][1]=0

for i in range(K):
    visit_count+=1
    next_town = TO[next_town-1]
    if visit_flag[next_town-1][0]==0:
        visit_flag[next_town-1][0]=1
        visit_flag[next_town-1][1]=visit_count
    else:
        first_visit=visit_flag[next_town-1][1]
        last_visit=visit_count
        break

roop=last_visit-first_visit
span=visit_flag[next_town-1][1]

if K<=roop:
    next_town = 1
    for i in range(K):     
        next_town = TO[next_town-1]
    ans=next_town
else:
    if roop==0:
        ans=next_town
    else:
        for i in range((K-span)%roop):
            next_town = TO[next_town-1]
        ans=next_town

print(ans)
x=raw_input()
x=x*x*x
print x

### FIXED CODE ###

x = input()
print x**3
import sys

def main(l):
    u = set()
    l = list(sorted(l))
    for i, a in enumerate(reversed(l)):
        searching = (1 << a.bit_length()) - a
        for j, b in enumerate(l[:-i-1]):
            if b == searching and not j in u:
                u.add(j)
                break

    return len(u)


if __name__ == '__main__':
    main(map(int, sys.stdin))

### FIXED CODE ###

input()
nbs = map(int, input().split())

answer = 0
count = {}

for nb in nbs:
    count[nb] = count.get(nb, 0) + 1

for nb in sorted(count.keys(), reverse=True):
    searching = (1 << nb.bit_length()) - nb
    nb_count = count[nb]
    sr_count = count.get(searching, 0)
    if sr_count:
        if nb == searching:
            increment = nb_count // 2
        else:
            increment = nb_count if nb_count < sr_count else sr_count
            count[searching] -= increment
        answer += increment

print(answer)
import numpy as np
n,m=[int(i) for i in input().split()]
x=[int(i) for i in input().split()]
y=[int(i) for i in input().split()]

def kk(z):
  zk=[]
  zi=z[0]
  ns=0
  nl=len(z)
  
  for i in z:
    if zi!=i:
      zk.append(abs(i-zi) *(ns*(nl-ns))% (10**9 + 7))
    zi=i
    ns+=1
  return zk

nx=np.array(kk(x), dtype = 'int64').reshape(len(x)-1,1)
ny=np.array(kk(y), dtype = 'int64')
nxy=nx*ny
print((nxy.sum()) % (10**9 + 7))

### FIXED CODE ###

I=lambda:[int(i)for i in input().split()]
n,m=I()
N=I()
M=I()
F=lambda x,y:sum(j*(y-1-2*i)for i,j in enumerate(x))
print(F(N,n)*F(M,m)%(10**9+7))
from math import pi

r = int(input())

print('%.6f %.6f' % (r*r*pi, 2*r*pi))



### FIXED CODE ###

from math import pi
 
r = float(input())
 
print('%.6f %.6f' % (r*r*pi, 2*r*pi))
A=map(int,input().split())
A.sort()
print(A[0]*A[1]//2)



### FIXED CODE ###

A=list(map(int,input().split()))
A.sort()
print(A[0]*A[1]//2)
# -*- coding:utf-8 -*-

N, Y = map(int, input().split())

count = 0

for i in range((Y//10000)+1):
    for j in range((Y//5000)+1):
        k = (Y -i*10000 + j*5000) // 1000
        if i + j + k == N:
            print("{0} {1} {2}".format(i, j, k))
            exit()

print("-1 -1 -1")


### FIXED CODE ###

# -*- coding:utf-8 -*-
N, Y = map(int, input().split())
flag = False

def isValid(l, m, n):
    sum = l*10000 + m*5000 + n*1000
    if sum == Y:
        return True
    return False

for i in reversed(range(N+1)):
    for j in range(N+1):
        if i + j > N:
            break
        else:
            if isValid(i, j, N-i-j):
                flag = True
                print("{0} {1} {2}".format(i, j, N-i-j))
                break
        if flag:
            break
    if flag:
        break

if not flag:
    print("-1 -1 -1")
import sys
def gcd(m, n):
    r = m % n
    return gcd(n, r) if r else n

def lcm(m, n):
    return m//gcd(m, n)*n

MOD = 10**9+7
n = int(input())
n, *a = map(int, sys.stdin.buffer.read().split())
l = a[0]
for x in a[1:]:
    l = lcm(x, l)

l %= MOD

ans = 0
for x in a:
    ans += l*pow(x, MOD-2, MOD)%MOD
print(ans%MOD)


### FIXED CODE ###

def gcd(m, n):
    r = m % n
    return gcd(n, r) if r else n

def lcm(m, n):
    return m//gcd(m, n)*n
MOD = 10**9+7
n = int(input())
a = list(map(int, input().split()))
l = a[0]
for x in a:
    l = lcm(x, l)
ans = 0
for x in a:
    ans += l*pow(x, MOD-2, MOD)%MOD
print(ans%MOD)
import decimal,math
from collections import Counter,defaultdict
from fractions import gcd
from bisect import bisect_right,bisect_left
decimal.getcontext().prec = 10
N=int(raw_input())

arr=map(int,raw_input().split())
arr=sorted(arr)
# l = float(pow(2,N-1))
ans=(arr[0]+arr[1])/l
# print ans
for i in range(1,N):
	arr[i] = (arr[i]+arr[i-1])/2.0
	# print arr
print arr[-1]	


### FIXED CODE ###

import decimal,math
from collections import Counter,defaultdict
from fractions import gcd
from bisect import bisect_right,bisect_left
decimal.getcontext().prec = 10
N=int(raw_input())

arr=map(int,raw_input().split())
arr=sorted(arr)
# l = float(pow(2,N-1))
# ans=(arr[0]+arr[1])/l
# print ans
for i in range(1,N):
	arr[i] = (arr[i]+arr[i-1])/2.0
	# print arr
print arr[-1]
N, A = map(int, input().split())
X = [0] + list(map(int, input().split()))

dp = [[[0 for k in range((N + 1) * max(X))]
       for j in range(N + 1)] for i in range(N + 1)]
for i in range(N + 1):
    dp[i][0][0] = 1

for j in range(1, N + 1):
    for k in range(1, j + 1):
        for s in range((N + 1) * max(X)):
            if s < X[j]:
                dp[j][k][s] = dp[j - 1][k][s]
            elif s >= X[j]:
                dp[j][k][s] = dp[j - 1][k - 1][s - X[j]] + dp[j - 1][k][s]
ans = 0
for k in range(1, N + 1):
    ans += dp[N][k][k * A]
print(ans)

### FIXED CODE ###

N,A = map(int,input().split())
ls1 = [0] + list(map(int,input().split()))

dp = [[[0 for k in range(2600)] for j in range(51) ] for i in range(51)]
for i in range(51):
    dp[i][0][0] = 1
for j in range(1,N+1):
    for k in range(1,j+1):
        for s in range(2600):
            if s < ls1[j]:
                dp[j][k][s] = dp[j-1][k][s]
            elif s >= ls1[j]:
                dp[j][k][s] = dp[j-1][k-1][s-ls1[j]] + dp[j-1][k][s]
ans = 0
for k in range(1,N+1):
    ans += dp[N][k][k*A]
print(ans)
N, H = map(int, input().split())
sword_list = [list(map(int, input().split())) for i in range(N)]
a_list = [i[0] for i in sword_list]
b_list = [i[1] for i in sword_list]
b_list.sort()
a_max = max(a_list)
index1 = 0
# Aの攻撃がBのいくつかの攻撃より強い場合、どの場所のBかを知っておく
for i in range(0, len(b_list)):
    if b_list[i] <= a_max and b_list[i + 1] > a_max:
        index1 = i + 1
ans = 0
# 全てBの攻撃で倒す場合    
if H - sum(b_list[index1:]) <= 0:
    count = 0
    for j in range(N - 1, -1, -1):
        count += b_list[j]   
        if count >= H:          
            ans = N - j
            break
# Aの攻撃を使う    
else:   
    ans = ((H - sum(b_list[index1:])) + a_max - 1) // a_max + N - index1

print(ans)

### FIXED CODE ###

import math
N, H = map(int, input().split())
A = []
B = []
for i in range(N):
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)
amax = max(A)
B = list(filter(lambda x: x > amax, B))
B.sort()
ans = 0
while H > 0:
    if B:
        H -= B.pop()
    else:
        ans += math.ceil(H / amax)
        break
    ans += 1
print(ans)
from itertools import permutations
from math import factorial


# メインプログラム
def func(N, lst):

    # N! を求める
    N_fact = factorial(N)

    # lst から座標のすべての組合せを求める。
    perm_grid_xy = permutations(lst)

    # すべての組合せを全探索して、総合距離を計算する
    total_dist = total_distance(N, perm_grid_xy)

    # 平均距離 = 総合距離 / N!
    average_dist = total_dist / N_fact

    return average_dist


def total_distance(N, perm_grid_xy):

  	ret = 0
    
    for grid_xy in perm_grid_xy:
        for i in range(N-1):
            x0, y0 = grid_xy[i][0], grid_xy[i][1]
            x1, y1 = grid_xy[i+1][0], grid_xy[i+1][1]
            dist = ((x0 - x1)**2 + (y0 - y1)**2) ** 0.5
            ret += dist
            
    return ret


if __name__ == "__main__":
    N = int(input())
    lst = [tuple(map(int, input().split())) for _ in range(N)]
    print(func(N, lst))

### FIXED CODE ###

from itertools import permutations
from math import factorial


# メインプログラム
def func(N, lst):

    # N! を求める
    N_fact = factorial(N)

    # lst から座標のすべての組合せを求める。
    perm_grid_xy = permutations(lst)

    # すべての組合せを全探索して、総合距離を計算する
    total_dist = total_distance(N, perm_grid_xy)

    # 平均距離 = 総合距離 / N!
    average_dist = total_dist / N_fact

    return average_dist


def total_distance(N, perm_grid_xy):
    
    ret = 0
    
    for grid_xy in perm_grid_xy:
        tmp = sum(
            ((grid_xy[i][0] - grid_xy[i+1][0]) ** 2 
            + (grid_xy[i][1] - grid_xy[i+1][1]) ** 2) ** 0.5 
            for i in range(N-1)
            )
        ret += tmp

    return ret


if __name__ == "__main__":
    N = int(input())
    lst = [tuple(map(int, input().split())) for _ in range(N)]
    print(func(N, lst))
import copy
N = int(input())
A = list(map(int, input().split()))

count_dict = [0] * N
for each in A:
    count_dict[each] += 1

all_types = 0
for value in count_dict:
    all_types += value * (value - 1) // 2

# result_dict = {}
# for each in a_types:
#     result_dict[each] = all_types - count_dict[each] + 1

for a in A:
    print(all_types - count_dict[a] + 1)

### FIXED CODE ###

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

c = [0]*n

for i in range(n):
    c[a[i]-1] = c[a[i]-1] + 1
    
total = 0
for x in c:
    total = total + x*(x-1)//2

for i in range(n):
    print(total - c[a[i]-1] + 1)
# 2020/02/11
# AtCoder Beginner Contest 103 - C

import math
import fractions

# Greatest Common Divisor(GCD)  
def gcd_fgf(a, b):
    return fractions.gcd(a, b)

# Least Common Multiple(LCM)
def lcm_fgf(a, b):
    return int(a * b / fractions.gcd(a, b))

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

# Calc Co-LCM
work_lcm = a[0]
for i in range(1, n):
    work_lcm = lcm_fgf(work_lcm, a[i])

m = work_lcm - 1

# Sum remains
fm = 0
for i in range(n):
    fm = fm + (m % a[i])

ans = fm    
# Output
print(ans)

### FIXED CODE ###

# 2020/02/11
# AtCoder Beginner Contest 103 - C

import math
import fractions

# Greatest Common Divisor(GCD)  
def gcd_fgf(a, b):
    return fractions.gcd(a, b)

# Least Common Multiple(LCM)
def lcm_fgf(a, b):
    return int(a * b // fractions.gcd(a, b))

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

# Calc Co-LCM
work_lcm = a[0]
for i in range(1, len(a)):
    work_lcm = lcm_fgf(work_lcm, a[i])

m = work_lcm - 1

# Sum remains
fm = 0
for i in range(len(a)):
    fm = fm + (m % a[i])

ans = fm    
# Output
print(ans)
Amax = max(A)
Amin = min(A)
ans = []
if Amax >= -Amin:
    im = A.index(Amax)+1
    i = 2
    while i <= N:
        if A[i-2] > A[i-1]:
            ans.append(str(im) + " " + str(i))
            A[i-1] += Amax
            if Amax < A[i-1]:
                im = i
                Amax = A[i-1]
        else:
            i += 1
else:
    im = A.index(Amin)+1
    i = N-1
    while i >= 1:
        if A[i-1] > A[i]:
            ans.append(str(im) + " " + str(i))
            A[i-1] += Amin
        if Amin > A[i-1]:
            im = i
            Amin = A[i-1]
        else:
            i -= 1
print(len(ans))
for out in ans:
    print(out)

### FIXED CODE ###

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

Amax = max(A)
Amin = min(A)
ans = []
if Amax >= -Amin:
    im = A.index(Amax)+1
    i = 2
    while i <= N:
        if A[i-2] > A[i-1]:
            ans.append(str(im) + " " + str(i))
            A[i-1] += Amax
            if Amax < A[i-1]:
                im = i
                Amax = A[i-1]
        else:
            i += 1
else:
    im = A.index(Amin)+1
    i = N-1
    while i >= 1:
        if A[i-1] > A[i]:
            ans.append(str(im) + " " + str(i))
            A[i-1] += Amin
            if Amin > A[i-1]:
                im = i
                Amin = A[i-1]
        else:
            i -= 1
print(len(ans))
for out in ans:
    print(out)
N = input()
T, A = map(int, input().split())
temperatures = list(map(int, input().split()))

r = 50000000
results = ''

list = [T - t * 0.006 for t in temperatures]
for index, avg_temp in enumerate(list):
  	if avg_temp < 0:
      	avg_temp = avg_temp * -1
      
    ondo_sa = A - avg_temp
    if r > ondo_sa:
        r = ondo_sa
        results = index + 1
print(results)

### FIXED CODE ###

N = input()
T, A = map(int, input().split())
temperatures = list(map(int, input().split()))
 
r = 50000000000000
results = ''
 
list = [T - t * 0.006 for t in temperatures]
for index, avg_temp in enumerate(list):
    ondo_sa = avg_temp - A
 
    if ondo_sa < 0:
        ondo_sa = - ondo_sa
 
    if r > abs(ondo_sa):
        r = ondo_sa
        results = index + 1
print(results)
N = int(input())
a = list(map(int, input().split()))

SUM = 0
for i in range(N):
  while a[i] >= 2 and a % 2 == 0:
    SUM += 1
    a[i] //= 2
    
print(SUM)






### FIXED CODE ###

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

SUM = 0
for i in range(N):
  while a[i] >= 2 and a[i] % 2 == 0:
    SUM += 1
    a[i] //= 2
    
print(SUM)
def cakes_and_donuts(N=N):
  max_7_num = N//7
  max_4_num = N//4
  for i in range(max_7_num):
    for j in range(max_4_num):
      if 7*(i+1) + 4*(j+1) == N:
        return 'Yes'
  return 'No'

N = int(input())
cakes_and_donuts(N)


### FIXED CODE ###

N = int(input())

def cakes_and_donuts(N=N):
  if N % 4 ==0 or N % 7 ==0:
    return 'Yes'  
  max_7_num = N//7
  max_4_num = N//4
  for i in range(max_7_num):
    for j in range(max_4_num):
      if 7*(i+1) + 4*(j+1) == N:
        return 'Yes'
  return 'No'

s = cakes_and_donuts(N)
print('{}'.format(s))
A,B,C,D=map(int,input().split())

print(max(0,min(C,D))-max(A,B)))

### FIXED CODE ###

A,B,C,D=map(int,input().split())

s=min(B,D)-max(A,C)
print(max(0,s))
import sys 
stdin = sys.stdin
ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())

n = ni()
btc = 380000
ans = 0
for _ range(n):
  a, b = ns().split()
  if b == "BTC":
    ans += float(a) * btc
  else:
    ans += int(a)
print(ans)

### FIXED CODE ###

N = int(input())
btc = 380000
cnt = 0
for _ in range(N):
  x, u = input().split()
  x = float(x)
  if(u == 'JPY'):
    cnt += x
  else:
    cnt += 380000*x
print(cnt)
import collections
N=int(input())
S=[input() for i in range(N)]
c=collections.Counter(S)
for i in range(len(c.most_common())):
  print(c.most_common()[i][0])
  if c.most_common()[i][1] !=c.most_common()[i+1][1]:
    break

### FIXED CODE ###

import collections
N = int(input())
s = [input() for i in range(N)]
 
counter = collections.Counter(s)
count = counter.most_common()
 
most = count[0][1]
 
c =[]
for i in range(len(count)):
    if count[i][1] == most:
        c.append(count[i][0])
 
c.sort()
 
for i in range(len(c)):
    print(c[i])
A, B=map(int, input().split)

print(A*B)

### FIXED CODE ###

A, B=map(int, input().split())

print(A*B)
N = int(input().split(''))
number_classmate = list(map(int, input().split('')))

classmate = [[0] * 2 for i in range(N)]

for i in range(len(number_classmate)):
    classmate[i][0] = number_classmate[i]
    classmate[i][1] = i+1
print(classmate)

classmate.sort(key=lambda s: s[0])

mapped_list = map(str, list(i[1] for i in classmate))
first_index = ' '.join(mapped_list)

print(first_index)





### FIXED CODE ###

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

classmate = [[0] * 2 for i in range(N)]

for i in range(len(number_classmate)):
    classmate[i][0] = number_classmate[i]
    classmate[i][1] = i+1

classmate.sort(key=lambda s: s[0])

mapped_list = map(str, list(i[1] for i in classmate))
first_index = ' '.join(mapped_list)

print(first_index)
def congruence(x, y): #=(a, b) such that ax+by=gcd(x,y)
  if x < y:
    (a, b) = congruence(y, x)
    return (b, a)
  z = x % y
  if z == 0:
    return (0, 1)
  (c, d) = congruence(y, z)
  return (d, (c - int(x / y) * d) % 1000000007)

inverse_sum = {1: 1}
for i in range(2, 100000):
  inverse_sum[i] = (inverse_sum[i - 1] + congruence(1000000007, i)[1]) % 1000000007

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

N_factorial = 1
for i in range(1, N + 1):
  N_factorial = (N_factorial * i) % 1000000007

ans = 0
for i in range(N):
  ans = (ans + (inverse_sum[i + 1] + inverse_sum[N - i] - 1) * A[i] * N_factorial) % 1000000007

print(ans)

### FIXED CODE ###

def congruence(x, y): #=(a, b) such that ax+by=gcd(x,y)
  if x < y:
    (a, b) = congruence(y, x)
    return (b, a)
  z = x % y
  if z == 0:
    return (0, 1)
  (c, d) = congruence(y, z)
  return (d, (c - int(x / y) * d) % 1000000007)

inverse_sum = {1: 1}
for i in range(2, 100001):
  inverse_sum[i] = (inverse_sum[i - 1] + congruence(1000000007, i)[1]) % 1000000007

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

N_factorial = 1
for i in range(1, N + 1):
  N_factorial = (N_factorial * i) % 1000000007

ans = 0
for i in range(N):
  ans = (ans + (inverse_sum[i + 1] + inverse_sum[N - i] - 1) * A[i] * N_factorial) % 1000000007

print(ans)
n=int(input())
from collections import Counter 
A=[]
for i in range(n):
  A.append(sorted(list(input())))
  
q=Counter(A);ans=0
for j in q.values():
  ans+= j*(j-1)//2
print(ans)


### FIXED CODE ###

n=int(input())
from collections import Counter 
A=[]
for i in range(n):
  a=sorted(input())
  a="".join(a)
  A.append(a)
ans=0
for j in Counter(A).values():
  ans+=j*(j-1)//2
print(ans)
import math
r=int(input())
print(r*r*math.pi,r*2*math.pi)

### FIXED CODE ###

import math
r=float(input())
print("{0:.10f}".format(r*r*math.pi),"{0:.10f}".format(r*2*math.pi))
N=int(input())
A=[0]*N
B=list(map(int,input().split()))
A[0]=B[0]
A[N-1]=B[N-2]
for i in range(1,N-1):
  A[i]=min(B[i],B[i+1])
  
print(sum(A))

### FIXED CODE ###

N=int(input())
B=list(map(int,input().split()))
A=[0]*N
A[0]=B[0]
A[N-1]=B[N-2]
for i in range(1,N-1):
  A[i]=min(B[i-1],B[i])
  
print(sum(A))
if N%2==0 :
    print((N)/2-1)
 else:
  print((N-1)/2)

### FIXED CODE ###

N=int(input())
if N%2==0:
    print(int((N)/2-1))
else:
    print(int((N-1)/2))
n = int(input())
s = input()
slimes = s.split("")
i = 0
while i < n - 1:
  s = slimes[i]
  while s == slimes[i+1]:
    del slimes[i+1]
    n -= 1
  i += 1
print n

### FIXED CODE ###

n = int(input())
s = input()

ans = 1
current = s[0]
for i in range(n):
  if current != s[i]:
    ans += 1 
    current = s[i]
print(str(ans))
a,b = list(map(int, input().split()))
    if a == b:
      print(2 * a)
    else:
      print(max(a,b) * 2 - 1)

### FIXED CODE ###

a, b = list(map(int,input().split()))
if a == b:
  print(2 * a)
else:
  print(max(a,b) * 2 -1)