Harryxun/stf_run huggingface dataset:
import bisect
from collections import deque

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

arr.sort()
arr = deque(arr)

for _ in range(m):
    q = arr.pop()
    bisect.insort_right(arr, q // 2)

print(sum(arr))

### FIXED CODE ###

from heapq import heapify, heapreplace

n, m = map(int, input().split())
arr = [-x for x in map(int, input().split())]
heapify(arr)

for _ in range(m):
    heapreplace(arr, int(arr[0] / 2))

print(-sum(arr))
n = input()
inf = 1000000000
M = [[inf for i in range(n)] for i in range(n)]
for i in range(n):
  str = raw_input().split()
  u = int(str[0])
  k = int(str[1])
  for j in range(k):
    x = 2+j
    y = 3+j
    v = int(str[x])
    c = int(str[y])
    M[u][v] = c
d = [inf for i in range(n)]
color = [0 for i in range(n)]

d[0] = 0
color[0] = 1

while 1:
  minv = inf
  u = -1
  for i in range(n):
    if minv>d[i] and color[i]!=2:
      u = i
      minv = d[i]
    print minv
  if u == -1:
    break
  color[u] = 2
  for v in range(n):
    if color[v]!=2 and M[u][v]!=inf:
      if d[v]>d[u]+M[u][v]:
        d[v] = d[u] + M[u][v]
        color[v] = 1
for i in range(n):
  if d[i]==inf:
    print '%d -1' % i
  else:
    print '%d %d' % (i, d[i])

### FIXED CODE ###

n = input()
inf = 1000000000
M = [[inf for i in range(n)] for i in range(n)]
for i in range(n):
  str = map(int, raw_input().split())
  u = str[0]
  k = str[1]
  for j in range(k):
    v = str[2+2*j]
    c = str[3+2*j]
    M[u][v] = c
d = [inf for i in range(n)]
color = [0 for i in range(n)]
 
d[0] = 0
color[0] = 1
 
while 1:
  minv = inf
  u = -1
  for i in range(n):
    if minv>d[i] and color[i]!=2:
      u = i
      minv = d[i]
  if u == -1:
    break
  color[u] = 2
  for v in range(n):
    if color[v]!=2 and M[u][v]!=inf:
      if d[v]>d[u]+M[u][v]:
        d[v] = d[u] + M[u][v]
        color[v] = 1
for i in range(n):
  if d[i]==inf:
    print '%d -1' % i
  else:
    print '%d %d' % (i, d[i])
n,t = map(int,input().split())
a = list(map(int,input().split()))
s = t
for i in range(0,n):
  s += min(t,a[i+1]-a[i])
print(s)

### FIXED CODE ###

n,t = map(int,input().split())
a = list(map(int,input().split()))
s = t
for i in range(0,n-1):
  s += min(t,a[i+1]-a[i])
print(s)
import numpy as np
#s = "1234567"
s = input()
#print(len(s))

ss = []

for i in range(len(s)-2):
    #print(s[i:i+3])
    ss.append(int(s[i:i+3]))

ss = np.array(ss)
print(np.abs((ss - 753)).min())

### FIXED CODE ###

s = int(input())
if s==3 or s==5 or s==7:
	print("YES")
else:
	print("NO")
import fractions
n=int(input())
a=list(map(int,input().split()))
b=[a[0]]*(n-1)
c=[a[n-1]]*(n-1)
for i in range(n-1):
  b[i+1]=min(b[i],fractions.gcd(a[i],a[i+1]))
  c[n-i-2]=min(c[n-i-1],fractions.gcd(a[n-i-1],a[n-i-2]))
x=1
for j in range(n-1):
  if j==0:
    print(c[1])
  else:
    y=fractions.gcd(b[j-1],c[j+1])
    if x<y:
      x=y
    else:
      x=x
print(x)

### FIXED CODE ###

import fractions 
n=int(input())
a=list(map(int,input().split()))
ans=a[0]
sna=a[n-1]
Ans=[ans]*n
Sna=[sna]*n
for j in range(1,n):
  ans=fractions.gcd(ans,a[j])
  Ans[j]=ans
  sna=fractions.gcd(sna,a[n-j-1])
  Sna[j]=sna
m=Sna[n-2]
for k in range(n-2):
  m=max(m,fractions.gcd(Ans[k],Sna[n-3-k]))
m=max(m,Ans[n-2])
print(m)
h1, m1, h2, m2, k = list(map(int, readline().split()))

x = (h2 - h1) * 60 + (m2 - m1)  # 起きている時間の長さ（分）
print(x - k)

### FIXED CODE ###

import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    a, b, c, d, e = list(map(int, readline().split()))

    x = a * 60 + b
    y = c * 60 + d
    z = y - x

    print(z-e)


if __name__ == '__main__':
    main()
N, K = [int(x) for x in input().split(' ')]
if K == 1:
    print(0)
    return
min = 1
max = N - (K - 1)
print(max - min)


### FIXED CODE ###

N, K = [int(x) for x in input().split(' ')]
if K == 1:
    print(0)
else:
    min = 1
    max = N - (K - 1)
    print(max - min)
N, M = map(int, input().split())
List = [list(map(int, input().split())) for _ in range(N)]

List.sort(key=lambda x:x[0])

amt = 0
money = 0
i=0
while amt<=M:
    money+=List[i][0]*List[i][1]
    amt+=List[i][1]
    i+=1
    
ans = money-(amt-M)*List[i-1][0]
print(ans)

### FIXED CODE ###

N, M = map(int, input().split())
List = [list(map(int, input().split())) for _ in range(N)]

List.sort(key=lambda x:x[0])

amt = 0
money = 0
i=0
while amt<M:
    money+=List[i][0]*List[i][1]
    amt+=List[i][1]
    i+=1

ans = money-(amt-M)*List[i-1][0]
print(ans)
import bisect
A, B, Q = map(int, input().split())
INF = 10 ** 18
s = [-INF] + [int(input()) for i in range(A)] + [INF]
t = [-INF] + [int(input()) for i in range(B)] + [INF]
for q in range(Q):
	x = int(input())
	b, d = bisect.bisect_right(s, x), bisect.bisect_right(t, x)
	res = INF
	for S in [s[b - 1], s[b]]:
		for T in [t[d - 1], t[d]]:
		d1, d2 = abs(S - x) + abs(T - S), abs(T - x) + abs(S - T)
	res = min(res, d1, d2)
	print(res)

### FIXED CODE ###

import bisect
A, B, Q = map(int, input().split())
INF = 10 ** 18
s = [-INF] + [int(input()) for i in range(A)] + [INF]
t = [-INF] + [int(input()) for i in range(B)] + [INF]
for q in range(Q):
    x = int(input())
    b, d = bisect.bisect_right(s, x), bisect.bisect_right(t, x)
    res = INF
    for S in [s[b - 1], s[b]]:
        for T in [t[d - 1], t[d]]:
            d1, d2 = abs(S - x) + abs(T - S), abs(T - x) + abs(S - T)
            res = min(res, d1, d2)
    print(res)
s=int(input())
n=len(str(s))
a=[0]*2019
ans=0
k=s%2019
a[k]+=1
for i in range(n):
  s=int(s*0.1)
  k=s%2019
  a[k]+=1
for i in range(2019):
  ans+=a[i]*(a[i]-1)/2

print(int(ans))

### FIXED CODE ###

s=input()
n=len(s)
a=[0]*2019
a[0]=1
k=0
ans=0
mod=1
for i in range(n-1,-1,-1):
  k=(k+int(s[i])*mod)%2019
  mod=(mod*10)%2019
  a[k]+=1
for i in a:
  ans+=i*(i-1)*0.5

print(int(ans))
from collections import Counter

n = int(input())
v = list(map(int, input().strip().split(" ")))
odd = []
even = []
for i in range(len(v)):
    if(i % 2 == 0):
        even.append(v[i])
    else:
        odd.append(v[i])


c_even = Counter(even).most_common(2)
c_odd = Counter(odd).most_common(2)

print(c_even, c_odd)

if(c_even[0][0] != c_odd[0][0]):
    print(n - c_even[0][1] - c_odd[0][1])
elif(len(c_even) != 1 and len(c_odd) != 1):
    second = max[c_even[1][1], c_odd[1][1]]
    print(n - c_even[0][1] - second)
else:
    print(min([c_even[0][1], c_odd[0][1]]))

### FIXED CODE ###

from collections import Counter
    
n = int(input())
v = list(map(int, input().split()))
odd = v[::2]
even = v[1::2]
    
c_even = Counter(even).most_common(2)
c_odd = Counter(odd).most_common(2)

    
if(c_even[0][0] != c_odd[0][0]):
    print(n - c_even[0][1] - c_odd[0][1])
else:
    if(len(c_even) == 1):
        print(n//2)
    else:
        # second = max[c_even[1][1], c_odd[1][1]]
        # print(n - c_even[0][1] - second)
        print(n - max(c_even[0][1] + c_odd[1][1], c_even[1][1] + c_odd[0][1]))
def third_root(q):
    x=q/2.0
    while abs(x**3-q)>=q*10**(-5):
        x=x-(x**3-q)/(3*x**2)
    return x
while 1:
    q=input()
    if q==-1:break
    ans=third_root(q)
    print(ans)

### FIXED CODE ###

def third_root(q):
    x=q/2
    while abs(x**3-q)>=q*10**(-5):
        x=x-(x**3-q)/(3*x**2)
    return x
while 1:
    q=eval(input())
    if q==-1:break
    ans=third_root(q)
    print(ans)
n = int(raw_input())
p = [0 for i in range(0, 101)]
m = [[0 for i in range(0, 101)] for j in range(0, 101)]

for i in range(1,n+1):
 m[i][i] = 0
 p[i-1], p[i] = map(int, raw_input().split())

for m in range(2,n+1):
 for i in range(1,n-m+1+1):
  j = i + m - 1
  m[i][j] = 100000000000
  for k in range(i,j-1+1):
   m[i][j] = min(m[i][j], m[i][k] + m[k+1][j] + p[i-1] * p[k] * p[j])

print m[1][n]

### FIXED CODE ###

n = int(raw_input())
p = [0 for i in range(0, 101)]
m = [[0 for i in range(0, 101)] for j in range(0, 101)]
for i in range(1, n+1):
    p[i-1], p[i] = map(int, raw_input().split())
     
for l in range(2, n+1):
    for i in range(1, n-l+2):
        j = i+l-1
        m[i][j] = float("inf")
        for k in range(i, j):
            m[i][j] = min(m[i][j], m[i][k] + m[k+1][j] + p[i-1]*p[k]*p[j])
 
print m[1][n]
N,M = map(int,input().split())
X = list(map(int,input().split()))

D = [abs(X[i] - X[i+1]) for i in range(N-1)]
D.sort(reverse=True)

print(sum(D[M+1:]))

### FIXED CODE ###

N,M = map(int,input().split())
X = list(map(int,input().split()))
X.sort()

D = [abs(X[i] - X[i+1]) for i in range(M-1)]
D.sort(reverse=True)

print(sum(D[N-1:]))
import numpy as np
N,X=map(int,input().split())
x=list(map(lambda x: abs(int(x)-X), input().split()))

x_min=min(x)
a=[x_min]*N
g=np.gcd(a,x)
print(min(g))


### FIXED CODE ###

import fractions
N,X=map(int,input().split())
x=list(map(lambda x: abs(int(x)-X), input().split()))
x_min=min(x)
g_min=x_min
for i in x:
  g=fractions.gcd(g_min,i)
  if g < g_min:
    g_min = g
print(g_min)
q=int(input())
l=[]
r=[]
for i in range(q):
    ll,rr=map(int,input().split())
    l.append(ll)
    r.append(rr)

similar=[]
cnt=0
for i in range(10**5+2):
    if i<=2:
        similar.append(0)
    else:
        if is_prime(i)==True and (is_prime((i+1)/2))==True:
            cnt+=1
        similar.append(cnt)

for i in range(q):
    print(similar[r[i]]-similar[l[i]-1])

### FIXED CODE ###

import math

def is_prime(n):
    if n == 1: return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True

q=int(input())
l=[]
r=[]
for i in range(q):
    ll,rr=map(int,input().split())
    l.append(ll)
    r.append(rr)

similar=[]
cnt=0
for i in range(10**5+2):
    if i<=2:
        similar.append(0)
    else:
        if is_prime(i)==True and (is_prime((i+1)/2))==True:
            cnt+=1
        similar.append(cnt)

for i in range(q):
    print(similar[r[i]]-similar[l[i]-1])
#!/usr/bin/env python3
import math

def solve(n, m, a):
    cost = [ math.inf, 2, 5, 5, 4, 5, 6, 3, 7, 6 ]

    small = [ None ] * min(100, n)
    small[0] = 0
    for i in range(1, len(small)):
        small[i] = max([ small[i - cost[a_i]] * 10 + a_i for a_i in a if cost[a_i] <= i ] + [ - math.inf ])

    min_cost, min_cost_a_i = min([ (cost[a_i], a_i) for a_i in a ])
    s = ''
    while n:
        k = (n - min_cost) // min_cost
        c = min_cost_a_i
        k, c = max([ ((n - cost[a_i]) // min_cost, a_i) for a_i in a if n - cost[a_i] >= 100 or small[n - cost[a_i]] >= 0 ])
        n -= cost[c]
        s += str(c)
    return s


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


### FIXED CODE ###

#!/usr/bin/env python3
math_inf = float('inf')  # the Python of AtCoder is too old

def solve(n, m, a):
    cost = [ math_inf, 2, 5, 5, 4, 5, 6, 3, 7, 6 ]
    dp = [ None ] * (n + 1)
    dp[0] = 0
    for i in range(1, len(dp)):
        dp[i] = max([ dp[i - cost[a_i]] * 10 + a_i for a_i in a if cost[a_i] <= i ] + [ - math_inf ])
    return str(dp[n])


n, m = map(int, input().split())
a = list(map(int, input().split()))
print(solve(n, m, a))
def gcd_t(s):
    if(len(s)==1):    return s[0]
    else:
        if(len(s)==2):    return gcd(s[0],s[1])
        m=gcd(s[-1],s[-2])
        s.pop()
        s.pop()
        s.append(m)
        return gcd_t(s)
    
def gcd(m,n):   
    if(n==0):    return m
    else:    return gcd(n,m%n)

x=[]
N,X=list(map(int,input().split()))
x=list(map(int,input().split()))
    
gcd_list=[]
for i in range(N):
    gcd_list.append(X-x[i])
    
print(abs(gcd_t(gcd_list)))

### FIXED CODE ###

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

x=[]
N,X=list(map(int,input().split()))
x=list(map(int,input().split()))
    
ans=abs(X-x[0])
for i in range(N):
    ans=gcd(ans,abs(x[i]-X))

print(ans)
n=input()
s=input()
t=input()
for i in range(n):
  print(list(s)[i], list(t)[i], sep='', end='')


### FIXED CODE ###

n=input()
s, t=str(input()).split()
for i in range(int(n)):
  print(list(s)[i], list(t)[i], sep='', end='')
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

H, W = nl()
grid = []
for i in range(H):
    grid.append(s())

yoko = [[0] * W for h in range(H)]
for row in range(H):
    prev = 0
    count = 0
    for col in range(W):
            for i in range(prev, col):
                yoko[row][i] = count
            prev = col+1
            count = 0
        else:
            count += 1
    for i in range(prev, W):
        yoko[row][i] = count

tate = [[0] * W for h in range(H)]
for col in range(W):
    prev = 0
    count = 0
    for row in range(H):
            for i in range(prev, row):
                tate[i][col] = count
            prev = col+1
            count = 0
        else:
            count += 1
    for i in range(prev, H):
        tate[i][col] = count

res = 0
for row in range(H):
    for col in range(W):
        res = max(res, yoko[row][col] + tate[row][col] - 1)

print(res)




### FIXED CODE ###

nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

H, W = nl()
grid = []
for i in range(H):
    grid.append(s())

ups = [[0]*W for j in range(H)]
downs = [[0]*W for j in range(H)]
lefts = [[0]*W for j in range(H)]
rights = [[0]*W for j in range(H)]

for col in range(W):
    p = 0
    for row in range(H):
        if grid[row][col] == '#':
            p = 0
        else:
            p += 1
        ups[row][col] = p

    p = 0
    for row in range(H-1, -1, -1):
        if grid[row][col] == '#':
            p = 0
        else:
            p += 1
        downs[row][col] = p

for row in range(H):
    p = 0
    for col in range(W):
        if grid[row][col] == '#':
            p = 0
        else:
            p += 1
        lefts[row][col] = p

    p = 0
    for col in range(W-1, -1, -1):
        if grid[row][col] == '#':
            p = 0
        else:
            p += 1
        rights[row][col] = p

res = 0
for row in range(H):
    for col in range(W):
        res = max(res, ups[row][col] + downs[row][col] + lefts[row][col] + rights[row][col] -3)
print(res)
a=input("")
b='Sunny'
c='Cloudy'
d='Rainy'
if a=b:
 print(c)
elif a=c:
 print(d)
elif a=d:
 print(b)

### FIXED CODE ###

a = input()
b = 'Sunny'
c = 'Cloudy'
d = 'Rainy'
if a == b:
 print(c)
if a == c:
 print(d)
if a == d:
 print(b)
N, K = map(int, input().split())

if K > (N - 1)(N - 2) // 2:
    print(-1)
else:
    M = N * (N - 1) // 2 - K
    cnt = 0
    ans = []
    for i in range(N - 1):
        for j in range(i + 1, N):
            ans.append((i + 1, j + 1))
            cnt += 1
            if M == cnt:
                break
        else:
            continue
        break
    print(M)
    for edge in ans:
        print(*edge)


### FIXED CODE ###

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

if K > (N - 1) * (N - 2) // 2:
    print(-1)
else:
    M = N * (N - 1) // 2 - K
    cnt = 0
    ans = []
    for i in range(N - 1):
        for j in range(i + 1, N):
            ans.append((i + 1, j + 1))
            cnt += 1
            if M == cnt:
                break
        else:
            continue
        break
    print(M)
    for edge in ans:
        print(*edge)
import sys
import  math
import fractions
from collections import defaultdict
import copy
stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

K=int(input())
mod_l=[0]*(K*10)
mod_l[0]=7%K
mod_k=7%K
ans=1
for i in range(10*K):
    if(mod_l[i]==0):
        print(ans)
        sys.exit(0)
    mod_k=(mod_k*10)%K   
    if(mod_k==0):
        print(-1)
        sys.exit(0)
    mod_l[i+1]=(mod_l[i]+mod_k)%K
    ans+=1



print(ans)

### FIXED CODE ###

import sys
import  math
import fractions
from collections import defaultdict
import copy
stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

K=int(input())
mod_l=[0]*(K*10)
mod_l[0]=7%K
mod_k=7%K
ans=1
for i in range(10*K-1):
    if(mod_l[i]==0):
        print(ans)
        sys.exit(0)
    mod_k=(mod_k*10)%K  
    if(mod_k==0):
        print("-1")
        sys.exit(0)
    mod_l[i+1]=(mod_l[i]+mod_k)%K
    ans+=1

print("-1")
time = int(input())
sec = time%60
min = (time//60)%60
hour = (time//60)//60

print (hour+":"+min+":"+sec)




### FIXED CODE ###

#
# 1d
#

def main():
    S = int(input())
    h = S // 60 // 60
    m = S // 60 % 60
    s = S % 60
    print(f"{h}:{m}:{s}")


if __name__ == '__main__':
    main()
n, x = map(int, input().split())
L = list(map(int, input().split()))
cnt = 0

for i in range(n+1):
    cnt += L[i]
    if cnt > x:
        print(i+1)
        exit()


### FIXED CODE ###

n, x = map(int, input().split())
L = list(map(int, input().split()))
D = [0]
cnt = 0

for i in range(n):
    cnt += L[i]
    if cnt <= x:
        D.append(cnt)

print(len(D))
N,K = map(int, input().split())
S = input()

for i in range(1,N+1):
    if i == K:
        S[i] == S[i].lower()

print(S)

### FIXED CODE ###

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

for i in range(N):
    if i == K-1:
        S[i] = S[i].lower()

S = ''.join(S)
print(S)
T = list(input())
N = len(T)

if N == 1 and T[0] == "?":
    T[0] = D
elif N == 2:
    if T[0] == "?" and T[1] == "?":
        T[0] = "P"
        T[1] = "D"
                
    elif T[0] == "?" and T[1] == "D":
        T[0] = "P"
                
    elif T[0] == "?" and T[1] == "P":
        T[0] = "D"
        
    elif T[0] == "P" and T[1] == "?":
        T[1] = "D"
elif N > 2:        
    if T[0] == "?" and T[1] == "?":
        T[0] = "P"
        T[1] = "D"
          
    elif T[0] == "?" and T[1] == "D":
        T[0] = "P"
            
    elif T[0] == "?" and T[1] == "P":
        T[0] = "D"
            
    elif T[0] == "D" and T[1] == "?" and T[2] == "D":
        T[1] = "P"
            
    elif T[0] == "D" and T[1] == "?" and T[2] == "P":
        T[1] = "D"
    
    elif T[0] == "P" and T[1] == "?":
        T[1] = "D"
        
if T[-1] == "?":
    T[-1] = "D"
    


for i in range(2,N-1):
    if T[i-2] == "P" and T[i-1] == "D" and T[i+1] == "D" and T[i] == "?":
        
        T[i] = "P"
        
        continue
    elif T[i] == "?":
       
        T[i] = "D"
        

ans = "".join(T)         
print(ans)


### FIXED CODE ###

T = list(input())
N = len(T)
if T[-1] == "?":
    T[-1] = "D"

if N == 1 and T[0] == "?":
    T[0] = D
elif N == 2:
    if T[0] == "?" and T[1] == "?":
        T[0] = "P"
        T[1] = "D"
                
    elif T[0] == "?" and T[1] == "D":
        T[0] = "P"
                
    elif T[0] == "?" and T[1] == "P":
        T[0] = "D"
        
    elif T[0] == "P" and T[1] == "?":
        T[1] = "D"
        
elif N > 2:        
    if T[0] == "?" and T[1] == "?":
        T[0] = "P"
        T[1] = "D"
          
    elif T[0] == "?" and T[1] == "D":
        T[0] = "P"
            
    elif T[0] == "?" and T[1] == "P":
        T[0] = "D"
            
    elif T[0] == "D" and T[1] == "?" and T[2] == "D":
        T[1] = "P"
            
    elif T[0] == "D" and T[1] == "?" and T[2] == "P":
        T[1] = "D"
    
    elif T[0] == "P" and T[1] == "?":
        T[1] = "D"
        
    for i in range(2,N-1):
        if T[i-2] == "P" and T[i-1] == "D" and T[i+1] == "D" and T[i] == "?":
            T[i] = "P"
            continue
        
        elif T[i] == "?":
            T[i] = "D"
        

ans = "".join(T)         
print(ans)
import math

a, b, x = map(int, input().split())
t1 = x * (2/(a*(b**2)))
t2 = a/(2 * b - x * (2/(a**2)))
if t1 < (a/b):
  print(90.-math.degrees(math.atan(t1)))
else:
  print(90.-math.degrees(math.atan(t2)))


### FIXED CODE ###

import math

a, b, x = map(int, input().split())
t1 = x * (2/(a*(b**2)))
if t1 < (a/b):
  print(90.-math.degrees(math.atan(t1)))
else:
  tmp = 2 * b - x * (2/(a**2))
  if tmp < 0.000001:
    print(0.)
  else:
    t2 = a/(2 * b - x * (2/(a**2)))
    print(90.-math.degrees(math.atan(t2)))
#ABC142_C
N=int(input())
A=list(map(int,input().split()))
ans=[i+1 for i,_ in sorted(enumerate(A),key=itemgetter(1))]

print(*ans)

### FIXED CODE ###

#ABC142_C
from operator import itemgetter
N=int(input())
A=list(map(int,input().split()))
ans=[i+1 for i,_ in sorted(enumerate(A),key=itemgetter(1))]

print(*ans)
from sys import stdin

N=int(input())
xlist=[]
ylist=[]
dict = {}
for i in range(N):
  x, y = map(int, stdin.readline().rstrip().split())
  xlist.append(x)
  ylist.append(y)

for i in range(N):
  for j in range(N):
    if i != j:
      tupleStr=str(xlist[i] - xlist[j])+","+str(ylist[i] - ylist[j])
      if tupleStr in dict:
        dict[tupleStr]+=1
      else:
        dict[tupleStr]=1

maxNum = max(dict.values())
print(N-maxNum)


### FIXED CODE ###

from sys import stdin

N=int(input())
xlist=[]
ylist=[]
dict = {}
for i in range(N):
  x, y = map(int, stdin.readline().rstrip().split())
  xlist.append(x)
  ylist.append(y)

for i in range(N):
  for j in range(N):
    if i != j:
      tupleStr=str(xlist[i] - xlist[j])+","+str(ylist[i] - ylist[j])
      if tupleStr in dict:
        dict[tupleStr]+=1
      else:
        dict[tupleStr]=1

maxNum=0
for val in dict.values():
  maxNum = max(maxNum, val)

print(N-maxNum)
s = input()

keyence = 'keyence'
flag = 0
k_i = 0
en = ""
en_list = []

for i in range(len(s)):
    if s[i] == keyence[k_i]:
        k_i += 1
        flag = 1
        if en != "":
            en_list.append(en)
            en = ""
    else:
        en += s[i]

if len(en_list) <= 1 and flag:
    print("YES")
else:
    print("NO")


### FIXED CODE ###

def main():
    s = input()
    keyence = 'keyence'

    if keyence == s:
        print("YES")
        return

    List = []
    for i in range(len(keyence)):
        List.append((keyence[0:i], keyence[i:len(keyence)]))

    ans = "NO"

    for left, right in List:
        l = len(left)
        r = len(right)
        if s[0:l] == left and s[-r:] == right:

            ans = "YES"

    print(ans)
    return


main()
##C
X = input()

from sympy import nextprime
print(nextprime(X))

### FIXED CODE ###

s = int(input())
if s <= 2:
  print(2)
  exit()
elif s <= 3:
  print(3)
  exit()
elif s <= 5:
  print(5)
  exit()

while True:
  for i in range(2,s // 2):
    if s % i == 0:
      break
  if i == s //2 -1:
    print(s)
    exit()
  s += 1
a,b=map(int,input().split())
print(abs((a-2)*(b-2)))

### FIXED CODE ###

print(input()[0]+input()[1]+input()[2])
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

res = 0
li = []
dic = {}
for i in range(5):
    li.append(int(input()))
    if li[i] % 10 != 0 and li[i] % 10 not in dic.values():
        dic[i] = li[i] % 10
m = min(dic.values())
for j in range(5):
    if li[j] % 10 == 0:
        res += li[j]
    else:
        if li[j] % 10 == m and j in dic.keys():
            res += li[j]
        else:
            res += (li[j] // 10 + 1) * 10
print(res)

### FIXED CODE ###

import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

res = 0
li = []
dic = {}
for i in range(5):
    li.append(int(input()))
for i in range(5):
    if li[i] % 10 != 0 and li[i] % 10 not in dic.values():
        dic[i] = li[i] % 10
if len(dic) == 0:
    res = sum(li)
else:
    m = min(dic.values())
    for j in range(5):
        if li[j] % 10 == 0:
            res += li[j]
        else:
            if li[j] % 10 == m and j in dic.keys():
                res += li[j]
            else:
                res += (li[j] // 10 + 1) * 10
print(res)
N = int(input())



total = 0
ans = [0]*(N+1)
i = 100
for x in range(1,i):
    for y in range(1,i):
        for z in range(1,i):
            total = (x + y + z)**2 - (x*y + y*z + x*z)
            if total <= N+1:
                ans[total] += 1



for i in range(1,N+1):
    print(ans[i])

### FIXED CODE ###

N = int(input())


ans = [0]*(N+1)
i = 102
for x in range(1,i):
    for y in range(1,i):
        for z in range(1,i):
            total = (x + y + z)**2 - (x*y + y*z + x*z)
            if total <= N:
                ans[total] += 1

for i in range(1,N+1):
    print(ans[i])