Harryxun/stf_run huggingface dataset:
from numpy.linalg import solve
import math

x, y = map(int, input().split())
m  = 10**9+7
if (x+y)%3 == 0:
    left, right = [[2,1],[1,2]], [x,y]
    nl = solve(left, right)
    nl.sort()
    print((math.factorial(sum(nl))//(math.factorial(sum(nl)-nl[0]) * math.factorial(nl[0])))%m)
else:
    print(0)

### FIXED CODE ###

import math
import numpy as np

def cmb(n, r, mod):
  r = min(r, n-r)
  return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 
N = 10**6
g1 = [1, 1] 
g2 = [1, 1] 
inverse = [0, 1] 

for i in range( 2, N + 1 ):
  g1.append( ( g1[-1] * i ) % mod )
  inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
  g2.append( (g2[-1] * inverse[-1]) % mod )

x,y = map(int,input().split()) 

if (x+y) % 3 == 0:

  A = np.array([[1, 2],[2, 1]])
  b = np.array([x, y])
  N = np.linalg.solve(A, b)
  if N[0].is_integer() == True and N[1].is_integer() == True and N[0] >=0 and N[1] >=0:
      print(cmb(int(N[0]+N[1]),int(N[0]),mod))
  else:
      print(0)
else:
  print(0)
from fractions import gcd
n,m = map(int, input().split())
a = list(map(int, input().split()))
lcm = 1
for i in range(0,len(a)):
  lcm = lcm * a[i] // gcd(lcm,a[i])

ans = m // lcm
if (ans+0.5) * lcm <= m:
  ans += 1
sum = 0
for i in range(0,len(a)):
  if (lcm // a[i]) % 2 == 1:
    sum += 1

if sum != len(a):
  ans = 0
print(ans)

### FIXED CODE ###

from fractions import gcd
n,m = map(int, input().split())
a = list(map(int, input().split()))
b = []
lcm = 1
for i in a:
    b.append(i//2)
for i in b:
  lcm = lcm // gcd(lcm,i) * i
ans = m // lcm
sum = 0
for i in b:
  if (lcm // i) % 2 == 1:
    sum += 1
if sum != len(a):
  print(0)
elif ans%2 ==1:
    print((ans+1)//2)
else:
    print(ans//2)
import math

A,B,H,M = map(int,input().split())
angH = 30.0*H+0.5*M
angM = 6.0*M
angD = abs(angH-angM)

if angD > 180.0:
    angD = 360.0-angD
cosD = math.cos(math.radians(angD))
ans2 = A*A + B*B - 2*A*B *cosD
ans = math.sqrt(ans2)
print(ans)

### FIXED CODE ###

data = ['pon','pon','hon','bon','hon','hon','pon','hon','pon','hon']
n = int(input()) % 10
print(data[n])
def koch(n, a, b):
  if n == 0:
    return
  s[0] = (2*a[0]* + b[0])/3
  s[1] = (2*a[1]* + b[1])/3
  t[0] = (a[0]* + 2*b.x)/3
  t[1] = (a[1]* + 2*b.y)/3
  u[0] = (t[0] - s[0])*cos(pi/3) - (t[1] - s[1])*sin(pi/3) + s[0]
  u[1] = (t[0] - s[0])*sin(pi/3) + (t[1] - s[1])*cos(pi/3) + s[1]

  koch(n-1, a, s)
  print  s[0], s[1]
  koch(n-1, s, u)
  print  u[0], u[1]
  koch(n-1, u, t)
  print  t[0], t[1]
  koch(n-1, t, b)

n = input()

p1[0] = 0
p1[1] = 0
p2[0] = 100
p2[1] = 0

print p1[0], p2[1]
koch(n, p1, p2)
print p1[0], p2[1]

### FIXED CODE ###

import math

rad = math.radians(60)

class coordinates:
  def __init__(self, x, y):
    self.x = x
    self.y = y
 
def koch(n, a, b):
  if n == 0:
    return
  s = coordinates((2.0*a.x + b.x)/3.0, (2.0*a.y + b.y)/3.0)
  t = coordinates((a.x + 2.0*b.x)/3.0, (a.y + 2.0*b.y)/3.0)
  ux = (t.x - s.x)*math.cos(rad) - (t.y - s.y)*math.sin(rad) + s.x
  uy = (t.x - s.x)*math.sin(rad) + (t.y - s.y)*math.cos(rad) + s.y
  u = coordinates(ux, uy)
  
  koch(n-1, a, s)
  print  s.x, s.y
  koch(n-1, s, u)
  print  u.x, u.y
  koch(n-1, u, t)
  print  t.x, t.y
  koch(n-1, t, b)
  
n = input()
  
p1 = coordinates(0.0, 0.0)
p2 = coordinates(100.0, 0.0)
  
print p1.x, p1.y
koch(n, p1, p2)
print p2.x, p2.y
def iput(): return int(input())
def mput(): return map(int, input().split())
def lput(): return list(map(int, input().split()))
 
def solve():
    n = iput()
    a = lput()
    ans = 1
    for i in range(n):
        ans *= a[i]
        if a[i] == 0:
          print(0)
          break
    if ans > 10**18:
        print(-1)
    else:
        print(ans)
    return 0
 
if __name__ == "__main__":
    solve()

### FIXED CODE ###

import math
import collections
import fractions
import itertools
import decimal

def solve():
    a, b = input().split()
    a = decimal.Decimal(a)
    b = decimal.Decimal(b)
    print(int(a*b))
    return 0

if __name__ == "__main__":
    solve()
from collections import Counter
from math import factorial


n = int(input())
a = list(map(int, input().split()))
d = Counter(a)
c = [0 for _ in range(max(a))]
for k, v in d.items():
    if v > 2:
        c[k - 1] = factorial(v) / factorial(2) / factorial(v - 2)
    else:
        c[k - 1] = 0
        
for i in range(n):
    ans = sum(c)
    p = a[i]
    res = c[p - 1] * (d[p] - 2) / d[p]
    ans -= c[p - 1] - res
    print(int(ans))


### FIXED CODE ###

from collections import Counter

n = int(input())
a = list(map(int, input().split()))
d = Counter(a)
c = [0 for _ in range(max(a))]
for k, v in d.items():
    c[k - 1] = v * (v - 1) / 2

ans = sum(c)
for i in range(n):
    p = a[i]
    res = c[p - 1] * (d[p] - 2) / d[p]
    ans -= c[p - 1] - res
    print(int(ans))
    ans += c[p - 1] - res
import sys
sys.setrecursionlimit(1000)

def calc(p1, p2, v):
    dists_v = dists[v]
    if v == n - 1:
        return dists_v[p1] + dists_v[p2]
    if visited[p1][p2]:
        return dp[p1][p2]
    dp[p1][p2] = min(dists_v[p1] + calc(p2, v, v + 1), dists_v[p2] + calc(p1, v, v + 1))
    visited[p1][p2] = True
    return dp[p1][p2]


n = int(input())
points = [complex(*map(int, input().split())) for _ in range(n)]
dists = [[abs(p1 - p2) for p2 in points] for p1 in points]
visited = [[False] * n for _ in range(n)]
dp = [[0] * n for _ in range(n)]

print(calc(0, 0, 0))

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)

def calc(p1, p2, v):
    dists_v = dists[v]
    if v == n - 1:
        return dists_v[p1] + dists_v[p2]
    if visited[p1][p2]:
        return dp[p1][p2]
    dp[p1][p2] = min(dists_v[p1] + calc(p2, v, v + 1), dists_v[p2] + calc(p1, v, v + 1))
    visited[p1][p2] = True
    return dp[p1][p2]


n = int(input())
points = [complex(*map(int, input().split())) for _ in range(n)]
dists = [[abs(p1 - p2) for p2 in points] for p1 in points]
visited = [[False] * n for _ in range(n)]
dp = [[0] * n for _ in range(n)]

print(calc(0, 0, 0))
coin500 = int(input())
coin100 = int(input())
coin50 = int(input())
total = int(input())

ans = 0
for i_500 in range(coin500 + 1):
    for i_100 in range(coin100 + 1):
        for i_50 in range(coin50 + 1):
            if 500 * i_500 + 100 * i_100 + 50 * i_50 = total:
                ans += 1
print(ans)


### FIXED CODE ###

coin500 = int(input())
coin100 = int(input())
coin50 = int(input())
total = int(input())

ans = 0
for i_500 in range(coin500 + 1):
    for i_100 in range(coin100 + 1):
        for i_50 in range(coin50 + 1):
            if 500 * i_500 + 100 * i_100 + 50 * i_50 == total:
                ans += 1
print(ans)
a = int(input())
b = input()
x = 0

if (a==0) :
	print('DENIED')
elif (b.count(0) > 0):
	print('DENIED')
else:
  for i in b:
      if i % a == 0:
          x += 1
  if x == len(b):
      print('APPROVED')
  else:
      print('DENIED')


### FIXED CODE ###

a,b,c = map(int, input().split())
 
if (a == b) and (b !=c):
	print('Yes')
elif (a == c) and (b !=c):
	print('Yes')
elif (b == c) and (a !=c):
	print('Yes')
else:
	print('No')
n=long(input())
s=0
while n>0:
    s=s+n%10
    n=n//10
if s%9==0:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

import sys 
def get_string(): return sys.stdin.readline().strip() 
  
string = get_string()
s=0
while string!='':
    s=s+int(string[-1])
    string=string[:-1]
if s%9==0:
    print('Yes')
else:
    print('No')
N , M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
a,b=[0],[0]
for i in range(N): a.append(a[i] + A[i])
for i in range(M): b.append(b[i] + B[i])
ans,j=0,0
for i in range(N+1):
  if a[i]>K:
    break
  while b[j] <= K - a[i]:
    j += 1
  ans = max(ans, i+j)
print(ans)

### FIXED CODE ###

N , M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
a,b=[0],[0]
for i in range(N): a.append(a[i] + A[i])
for i in range(M): b.append(b[i] + B[i])
ans,j=0,M
for i in range(N+1):
  if a[i]>K:
    break
  while b[j] > K - a[i]:
    j -= 1
  ans = max(ans, i+j)
print(ans)
import sys
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり

N,K = LI()
A = LI()

if K == 0:
    print(sum(A))
    exit()

k = K.bit_length()

B = []  # 理想

for i in range(k):
    if i == 0:
        if sum(A[j] & 1 for j in range(N)) >= (N+1)//2:
            B.append(0)
        else:
            B.append(1)
    else:
        if sum((A[j] >> i) & 1 for j in range(N)) >= (N+1)//2:
            B.append(B[-1])
        else:
            B.append(B[-1] + (1 << i))

if B[-1] <= K:
    print(sum(B[-1]^A[i] for i in range(N)))
    exit()

ANS = [K,K-1]
a = 0
for i in range(k-1,0,-1):
    if ((K >> i) << i) + B[i-1] <= K:
        ANS.append((K >> i) << i + B[i-1])
    if K >> i == 1:
        ANS.append((K >> (i+1)) << (i+1) + B[i-1])

ans = 0
for x in ANS:
    ans = max(ans,sum(x^A[i] for i in range(N)))

print(ans)

### FIXED CODE ###

import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり


N,K = MI()
K += 1
k = K.bit_length()
K_bit = [(K >> i) & 1 for i in range(k)]  # Kのbitのリスト(下から)
A = LI()
A_bit = [[(A[i] >> j) & 1 for j in range(k)] for i in range(N)]  # Aiたちのbitのリスト(下から)

X = [0]*(k+1)  # 下i桁で最適なもの
for i in range(k):
    a = sum(A_bit[j][i] == 0 for j in range(N))  # 0の個数
    X[i+1] = X[i]
    if a >= N//2+1:
        X[i+1] += 2**i


def f(x):
    return sum(x^A[i] for i in range(N))


ans = 0
for i in range(k-1,-1,-1):
    if K_bit[i] == 1:
        ans = max(ans,f(((K >> (i+1)) << (i+1))+X[i]))

print(ans)
print(x**3)

### FIXED CODE ###

x = int(input())
print( x ** 3)
h,m=divmod(int(input()),3600)
m,s=divmod(m,60)
print(h+':'+m+':'+s)

### FIXED CODE ###

S = int(input())
print("{}:{}:{}".format(S//60//60, S//60%60,S%60))
from collections import defaultdict, Counter

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

c_al = Counter(al)
mod = 10**9 + 7

if n % 2 == 0 and 0 not in c_al.values():
    print((2 ** (n / 2)) % mod)
elif n % 2 != 0 and c_al[0] == 1:
    print((2 ** (n // 2)) % mod)
else:
    print(0)


### FIXED CODE ###

from collections import Counter

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

c_al = Counter(al)

if n % 2 == 0:
    for k,v in c_al.items():
        if v != 2:
            print(0)
            exit()
    print(pow(2, n // 2, 10 ** 9 + 7))

elif n % 2 != 0:
    for k, v in c_al.items():
        if k == 0:
            if v != 1:
                print(0)
                exit()
        elif v != 2:
            print(0)
            exit()
    print(pow(2, n // 2, 10 ** 9 + 7))
import bisect
 
 
n, k = map(lambda x: int(x), input().split())
a = list(map(lambda x: int(x), input().split()))
 
a.sort()
pos = bisect.bisect(a, 0)
 
def judge(cur):
    global n, k, a
    cnt, j = 0, 1
    for i in range(pos):
        while(j < len(a) and (i == j or a[i] * a[j] > cur)): j += 1
        if(j >= len(a)): break
        cnt += (len(a) - j)
 
    j = len(a) - 1
    for i in range(pos, len(a)):
        while(j > i and (i == j or a[i] * a[j] > cur)): j -= 1
        if(i >= j): break
        cnt += (j-i)
 
    if(cnt >= k): return True
    else: return False
 
 
l, r = int(-1e18), int(1e18)
while(l < r):
    m = (l+r)>>1
    if(judge(m)): r = m
    else: l = m + 1

if(judge(r) == False): r -= 1
print(r)

### FIXED CODE ###

a = set(map(lambda x: int(x), input().split()))

if(len(a) == 2):
    print('Yes')
else: print('No')
n = int(input())
h = list(map(int,input().split()))
count = 0
ans = []
for i in range(7):
  if i == n-1:
    ans.append(count)
    break
  if h[i] >= h[i+1]:
    count += 1
  else:
    ans.append(count)
    count = 0
print(max(ans))

### FIXED CODE ###

n = int(input())
h = list(map(int,input().split()))
count = 0
ans = []
for i in range(n):
  if i == n-1:
    ans.append(count)
    break
  if h[i] >= h[i+1]:
    count += 1
  else:
    ans.append(count)
    count = 0
print(max(ans))
S = input()
N = len(S)
su = 0
L = [0]*13
L[0] = 1
M = [1, 10, 9, 12, 3, 4]
mod = 10**9+7
for i, c in enumerate(S[::-1]):
    m = M[i % 6]
    if c=="?":
        Lc = L.copy()
        for j in range(m, m*10, m):
            for k in range(13):
                idx = (k+j)%13
                L[idx] = (L[idx] + Lc[k]) % mod
    else:
        su += int(c) * m
print(L[(-su+5)%13])


### FIXED CODE ###

S = input()
N = len(S)
su = 0
L = [0]*13
L[0] = 1
M = [1, 10, 9, 12, 3, 4]
mod = 10**9+7
for i, c in enumerate(S[::-1]):
    m = M[i % 6]
    if c=="?":
        Lc = L[:]
        for j in range(m, m*10, m):
            for k in range(13):
                idx = (k+j)%13
                L[idx] = (L[idx] + Lc[k]) % mod
    else:
        su += int(c) * m
print(L[(-su+5)%13])
from collections import OrderedDict as od

 
dic = od()
for s in "abcdefghijklmnopqrstuvwxyz":
    dic[s] = 0

x = ""
while True:  
    try:  
        x += line
    except EOFError:
        break

for key,value in dic.items():
    value = x.count(key)
    print(key, ":", value)


### FIXED CODE ###

from collections import OrderedDict as od
 
  
dic = od()
for s in "abcdefghijklmnopqrstuvwxyz":
    dic[s] = 0
 
x = ""
while True:  
    try:  
        x += input().lower()
    except EOFError:
        break
 
for key,value in dic.items():
    value = x.count(key)
    print(key, ":", value)
N = int(input()) ans='' whileN>0:
N -= 1
ans += chr(ord('a') + N % 26) N //= 26
print(ans[::-1])

### FIXED CODE ###

N = int(input()) 
ans=""
while N>0:
    N -= 1
    ans += chr(ord('a') + N % 26) 
    N //= 26
print(ans[::-1])
N,K = map(int,input().split())
A = list(map(int,input().split()))

ch = 1
ind = 0
bits = [ch]
while ch*2 <= K:
    ind += 1
    ch *= 2
    bits.append(ch)

#print(ch,ind)
#ch_max = 2**(ind+1) -1
#print(ch_max)

tmp = [0 for _ in range(ind+1)]

for a in A:
    for i,bit in enumerate(bits):
        if a & bit:
            tmp[i] = tmp[i] + 1
#print(tmp)

ans_x = 0
for i,t in enumerate(tmp):
    if 2*t < N and K > 0:# and ans_x + bits[i] <= K:
        ans_x += bits[i]
#        print('koko')
    else:
        ans_x += 0
#        print(bits[i])

ans = 0
if ans_x <= K:
    for n in range(N):
        ans += ans_x ^ A[n]
else:
    ans_max = 0
    for i in range(100):
        ans_tmp = 0
        for n in range(N):
            ans_tmp += (K-i) ^ A[n]
        ans_max = max(ans_tmp,ans_max)

    ans = ams_max

    # for i in range(ans_x - bits[-1],K+1):
    #     ans_x2 = i
    #     ans_tmp = 0
    #     for n in range(N):
    #         ans_tmp += ans_x2 ^ A[n]
    #     ans_max = max(ans_max, ans_tmp)

    # ans = ans_max

print(ans)


### FIXED CODE ###

#https://atcoder.jp/contests/abc117/submissions/4165407
n,k=map(int,input().split())
a=list(map(int,input().split()))
t,ans=2**40,0
while t:
    c=sum([(a[i]&t)//t for i in range(n)])
    if k<t or c*2>=n:
        ans+=t*c
    else:
        ans+=t*(n-c)
        k -= t
    t //= 2

print(ans)
in_num = input('')

all_num = in_num.split()
a = all_num[0]
b = all_num[1]
c = all_num[2]

if(4 * long(a) * long(b) - (long(c) - long(a) - long(b))**2 >0):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

s = input()
A = s.split(' ')
B = [int(i) for i in A]
a, b, c = B[0], B[1], B[2]

if c-a-b <= 0:
    print('No')
else:
    L = 4 * a * b
    R = (c-a-b) ** 2
    print('Yes' if (L < R) else 'No')
import numpy as np

N = int(input())
AB = np.zeros((3, N))

for i in range(N):
    tmpA, tmpB = map(int, input().split())
    AB[0, i] = tmpA + tmpB
    AB[1, i] = tmpA
    AB[2, i] = tmpB

AB = AB[:, np.argsort(AB[0, :])][::-1]

point = 0
for i in range(N):
    if i%2==0:
        point += AB[1, i]
    else:
        point -= AB[2, i]
 
print(int(point))


### FIXED CODE ###

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

ab = [A, B]
max_katu = min(ab)

if A+B >= N:
    min_katu = A+B-N
else:
    min_katu = 0


ans = [str(max_katu), str(min_katu)]
print(' '.join(ans))
#最初に入力される情報を整理する
str_input_list = input().rstrip().split(' ')

int_input_list = []
for a in str_input_list:
    int_input_list.append(int(a))

length = int_input_list[0]
amount = int_input_list[1]

#文字列を受け取りリストに格納
mojiretu_list = []
for a in range(amount):
    mojiretu_list.append(input())


#文字列を小さい順に並べ、結合
sorted_list = sorted(mojiretu_list)
min_mojiretu = ''
for a in range(amount):
    min_mojiretu += sorted_list[a]

#出力
print(min_mojiretu)

### FIXED CODE ###

amount, length = map(int, input().split())
S = sorted([input() for a in range(amount)])
print(''.join(S))
a,b=map(int,[input().split())
if (a*b)%2==0:
    print("Even")
else:
    print("Odd")

### FIXED CODE ###

a,b=map(int,input().split())
if (a*b)%2==0:
    print("Even")
else:
    print("Odd")
x,y,z,k=map(int,input().split())
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)
ab=[]
for i in range(x):
    for j in range(y):
        ab.append(a[i]+b[j])
ab.sort(reverse=True)
ans=[]
for i in range(min(k,x*y)):
    for j in range(z):
        ans.append(ab[i]+c[j])
ans.sort(reverse=True)
for i in range(k):
    print(ans[i])

### FIXED CODE ###

a=[int(input()) for i in range(5)]
k=int(input())
for i in range(4):
    for j in range(i+1,5):
        if a[j]-a[i]>k:
            print(":(")
            exit()
print("Yay!")
def next_node(node_num):
    next_nodes = []
    for edge in tree:
        if edge[0] == node_num:
            next_nodes.append(edge[1])
    return next_nodes
 
def all_nodes(num):
  x = [] 
  add_nodes = next_node(num)
  while add_nodes != []:
    for i in add_nodes:
      add_nodes += next_node(i) 
      x += add_nodes
      add_nodes = []
  return x
 
 
def add(score, procedure):
  "procedure = [p, x]"
  score[procedure[0]-1] += procedure[1]
  for n in all_nodes(procedure[0]):
    score[n-1] += procedure[1]
  return score
 
 
score = [0]*N
for procedure in process:
    add(score, procedure)
print(score)


### FIXED CODE ###

a = int(input()) 
s = str(input()) 
if a>= 3200: 
  print(s)
else:
  print("red")
n=int(input())
odd=[i for i in range(1,n+1) if len(str(i))%==1]
print(len(odd))

### FIXED CODE ###

n=int(input())
ans=min(n,9)
if n>99: ans=min(n-90,909)
if n>9999: ans=n-9000-90
if n>99999: ans=90909
print(ans)
def main():
    a, b, c, d = map(int, input().split())
    num_list = [a, b, c, d]
    if (a-b-c-d == 7): print('{}-{}-{}-{}=7'.format(*num_list))
    elif (a-b-c+d == 7): print('{}-{}-{}+{}=7'.format(*num_list))
    elif (a-b+c-d == 7): print('{}-{}+{}-{}=7'.format(*num_list))
    elif (a+b-c-d == 7): print('{}+{}{}-{}=7'.format(*num_list))
    elif (a-b+c+d == 7): print('{}-{}+{}+{}=7'.format(*num_list))
    elif (a+b-c+d == 7): print('{}+{}-{}+{}=7'.format(*num_list))
    elif (a+b+c+d == 7): print('{}+{}+{}+{}=7'.format(*num_list))
                    

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    num = input()
    a, b, c, d = [int(i) for i in num]
    num_list = [a, b, c, d]
    if (a-b-c-d == 7): print('{}-{}-{}-{}=7'.format(*num_list))
    elif (a-b-c+d == 7): print('{}-{}-{}+{}=7'.format(*num_list))
    elif (a-b+c-d == 7): print('{}-{}+{}-{}=7'.format(*num_list))
    elif (a+b-c-d == 7): print('{}+{}-{}-{}=7'.format(*num_list))
    elif (a-b+c+d == 7): print('{}-{}+{}+{}=7'.format(*num_list))
    elif (a+b+c-d == 7): print('{}+{}+{}-{}=7'.format(*num_list))
    elif (a+b-c+d == 7): print('{}+{}-{}+{}=7'.format(*num_list))
    elif (a+b+c+d == 7): print('{}+{}+{}+{}=7'.format(*num_list))
                    

if __name__ == '__main__':
    main()
n = int(input())
l = list(map(int, input().split()))
res = list(np.argsort(l)+1)
print(" ".join(map(str, res)))


### FIXED CODE ###

import numpy as np
n = int(input())
l = list(map(int, input().split()))
res = list(np.argsort(l)+1)
print(" ".join(map(str, res)))
# coding: utf-8
# Your code here!
N,K=map(int,input().split())
X=list(map(int,input().split()))

def journey(main,sub):
    if len(main)==1:
        main.append(10**18)
    elif len(sub)==1:
        sub.append(10**18)
    dp=0
    nm=1
    ns=1
    ans=0
    for _ in range(K):
        dism=(main[nm]-main[nm-1])
        diss=(sub[ns]-sub[ns-1])
        if nm==len(main)-1:
            ans+=2*diss
            ns+=1
        elif ns==len(sub)-1:
            ans+=dism
            nm+=1
        elif dism>2*diss:
            ans+=diss*2
            ns+=1
        else:
            ans+=dism
            nm+=1
    return ans

i=0
while X[i]<0:
    i+=1

neg=[0]
pos=[0]
neg=neg+list(map(lambda x:x*(-1),X[:i][::-1]))
pos=pos+X[i:]


print(min(journey(pos,neg),journey(neg,pos)))


### FIXED CODE ###

# coding: utf-8
# Your code here!
import bisect

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

zero=bisect.bisect_left(X,0)

ans=10**18
start=max(0,zero-K)
for i in range(start,start+N-K+1):
    #print(i)
    m=min(0,X[i])
    M=max(0,X[i+K-1])
    ans=min((abs(m)+abs(M)*2),(abs(m)*2+abs(M)),ans)
    if i+K==N:
        break
    
print(ans)
H, W, M = map(int ,input().split())

X = [0] * W
Y = [0] * H
Map = [[0] * W for _ in range(H)]

for _ in range(M):
    h, w = map(int, input().split())
    h -= 1
    w -= 1
    Y[h] += 1
    X[w] += 1
    Map[h][w] = 1

MX = max(X)
MY = max(Y)
ans = MX + MY - 1
Xans = []
Yans = []
for i, x in enumerate(X):
    if x == MX:
        Xans.append(i)
for i, y in enumerate(Y):
    if y == MY:
        Yans.append(i)
for x in Xans:
    for y in Yans:
        if Map[y][x] == 0:
            ans += 1
            break
print(ans)


### FIXED CODE ###

import sys
input = sys.stdin.buffer.readline

H, W, M = map(int, input().split())

X = [0] * W
Y = [0] * H
Map = []

for _ in range(M):
    h, w = map(int, input().split())
    h -= 1
    w -= 1
    Y[h] += 1
    X[w] += 1
    Map.append((h, w))

MX = max(X)
MY = max(Y)
ans = MX + MY
Xans = set()
Yans = set()
for i, x in enumerate(X):
    if x == MX:
        Xans.add(i)
for i, y in enumerate(Y):
    if y == MY:
        Yans.add(i)
cnt = 0
for h, w in Map:
    if h in Yans and w in Xans:
        cnt += 1
if cnt == len(Xans) * len(Yans):
    ans -= 1
print(ans)
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.par = [-1] * n

    def find(self, x):
        if self.par[x] < 0:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    def unite(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.par[x] > self.par[y]:
            x, y = y, x

        self.par[x] += self.par[y]
        self.par[y] = x

    def size(self, x):
        return -self.par[self.find(x)]

n, k = map(int, input().split())
uf = UnionFind(n)
for _ in range(k):
    a, b = map(int, input().split())
    uf.unite(a, b)

cnt = 0
for x in uf.par:
    if x < 0:
        cnt += 1
print(n - cnt)


### FIXED CODE ###

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.par = [-1] * n

    def find(self, x):
        if self.par[x] < 0:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    def unite(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.par[x] > self.par[y]:
            x, y = y, x

        self.par[x] += self.par[y]
        self.par[y] = x

    def size(self, x):
        return -self.par[self.find(x)]


n, k = map(int, input().split())
uf = UnionFind(n)
for _ in range(k):
    a, b = map(int, input().split())
    uf.unite(a - 1, b - 1)

cnt = 0
for x in uf.par:
    if x < 0:
        cnt += 1
print(cnt - 1)
a = int(input())
2 s = input()
3 print(s if a >= 3200 else 'red')

### FIXED CODE ###

a = int(input())
s = input()
print(s if a >= 3200 else 'red')
N,K = map(int,input().split())
list = input().split()
MIN = int(list[0])
SUM = 0
import sys
if K<1 or N<1 or K>1000 or N>1000:
    sys.exit()
for j in range(0,K):
  for i in list:
    if(i<1 or i>1000):
        sys.exit()
    if MIN > int(i):
      MIN = int(i)
  list.remove(str(MIN))
  SUM += MIN
  MIN = int(list[0])
print(SUM)



### FIXED CODE ###

N,K = map(int,input().split())
import sys
if N==1:
    print(input())
    sys.exit()
list = input().split()
MIN = 1001
SUM = 0
for j in range(0,K):
  for i in list:
    if MIN > int(i):
      MIN = int(i)
  list.remove(str(MIN))
  SUM += MIN
  MIN = 1001
print(SUM)