Problem:


Score : 300 points

Problem Statement

Takahashi is a teacher responsible for a class of N students.

The students are given distinct student numbers from 1 to N.

Today, all the students entered the classroom at different times.

According to Takahashi's record, there were A_i students in the classroom when student number i entered the classroom (including student number i).

From these records, reconstruct the order in which the students entered the classroom.

Constraints

 1 \le N \le 10^5 

 1 \le A_i \le N 

 A_i \neq A_j  (i \neq j)

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N
A_1 A_2 \ldots A_N

Output

Print the student numbers of the students in the order the students entered the classroom.

Sample Input 1

3
2 3 1

Sample Output 1

3 1 2

First, student number 3 entered the classroom.

Then, student number 1 entered the classroom.

Finally, student number 2 entered the classroom.

Sample Input 2

5
1 2 3 4 5

Sample Output 2

1 2 3 4 5

Sample Input 3

8
8 2 7 3 4 5 6 1

Sample Output 3

8 2 4 5 6 7 3 1



Sample input:
3
2 3 1


Sample output:
3 1 2

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
ans=[0 for i in range(N)]
for i,a in enumerate(A):
  ans[a-1]=i+1
  
for a in ans:
  print(a,end=" ")

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int, input().split()))

ans = [0] * N
for i in range(N):
    ans[L[i] - 1] = str(i+1)

print(" ".join(ans))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
b = [0]*n
for i in range(n):
    b[a[i]-1] = i+1
print(" ".join(map(str,b)))

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i) for i in input().split()]

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

print(*ans)

Submission status: Accepted

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

X = [[0,0] for i in range(N)]

for i in range(N):
  X[i][0] = A[i]
  X[i][1] = i+1
  
X.sort()

ans = []
for i in range(N):
  ans.append(X[i][1])
  
print(" ".join(map(str, ans)))

Submission status: Accepted

Solution code:
import math
import numpy as np

def main():
    N = int(input())
    As = list(map(int, input().split()))
    As = np.array(As)
    idx = np.argsort(As)
    ret = ' '.join(map(str, idx+1))
    print(ret)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int,input().split()))
t=[0]*n
i=1
for e in l:
    t[e-1]=str(i)
    i+=1
print(' '.join(t))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
B = [0]*N
for i in range(N):
    B[A[i]-1] = i+1
[print(b) for b in B]

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
r={}
for index, value in enumerate(A):
  r[value]=index+1

for value in r.values():
	print(value, end=" ")

Submission status: Accepted

Solution code:
from __future__ import print_function

import sys
input = sys.stdin.readline

def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return

# import math
# import string
# import fractions
# from fractions import Fraction
# from fractions import gcd

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

# import re
# import array
# import copy
# import functools
# import operator

# import collections
# import itertools
# import bisect
# import heapq


# from heapq import heappush
# from heapq import heappop
# from heapq import heappushpop
# from heapq import heapify
# from heapq import heapreplace

# from queue import PriorityQueue as pq

# def reduce(p, q):
#     common = fractions.gcd(p, q)
#     return (p//common , q//common )
# # from itertools import accumulate
# # from collections import deque

# from operator import mul
# from functools import reduce

# def combinations_count(n, r):
#     r = min(r, n - r)
#     numer = reduce(mul, range(n, n - r, -1), 1)
#     denom = reduce(mul, range(1, r + 1), 1)
#     return numer // denom

# import random

def main():
    n = int(input().strip())
    a = list(map(int, input().strip().split()))
    l = [[a[i],i] for i in range(len(a))]
    l.sort()
    # eprint("l ",end=": ")
    # eprint(l)
    l_ans=[l[i][1] + 1 for i in range(len(l))]
    print(*l_ans)
    return

if __name__ == '__main__':
    main()

    ''''
    0  1  2 
    2p 3p 1p


    '''

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def main():
    N = I()
    a = LI()
    X = [(i+1, x) for (i, x) in enumerate(a)]
    X = sorted(X, key=lambda x: x[1])
    ans = " ".join([str(x[0]) for x in X])
    print(ans)
main()

Submission status: Accepted

Solution code:
N = int(input())
A = map(int, input().split())

L = []
for idx, order in enumerate(A):
    L.append((idx + 1, order))

L.sort(key=lambda x: x[1])

for idx, _ in L:
    print(idx, end=' ')

print('')

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
D = {}
for i in range(N):
  D[A[i]] = i + 1
for i in range(N-1):
  print(D[i+1], end = ' ')
print(D[N])

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
dic_A={}
for i in range(N):
    dic_A[A[i]]=i+1
dic_A=sorted(dic_A.items())
ans=[str(v[1]) for v in dic_A]
print(' '.join(ans))

Submission status: Accepted

Solution code:
def main():
	n = int(input())
	List = list(map(int,input().split()))
	# print(List)
	ans = []

	for i in range(n):
		ans.append(0)
	
	# print(ans)
	
	for i in range(n):
		# print("i = {}".format(i))
		# print("List[i] ={}".format(List[i]))
		ans[List[i]-1] = i+1
		# print("ans[i] = {}".format(ans[i]))
		# print("List[List[i]] = {}".format(List[List[i]-1]))

	print(' '.join(map(str,ans)))

if __name__ == '__main__':
	main()

Submission status: Accepted

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

dict_ans = {}
for i in range(N):
    dict_ans[A[i]] = i+1

dict_sort_ans = sorted(dict_ans.items(), key=lambda x:x[0])
for i in range(N):
    print(dict_sort_ans[i][1], end=' ')

Submission status: Accepted

Solution code:
n = int(input())

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

b = [[] for i in range(n)]
for i in range(n):
    b[a[i]-1] = i+1

print(" ".join(map(str,b)))

Submission status: Accepted

Solution code:
a = int(input())
b = list(map(int,input().split()))
test_dict = {}
for i in range(a):
    test_dict[i+1] = b[i]
score_sorted = sorted(test_dict.items(), key=lambda x:x[1])
ans = ''
for i in score_sorted:
    ans += str(i[0])+' '
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
*l, = map(int,input().split())
ans = [0]*n
for i in range(n):
  ans[l[i]-1] = i+1
print(' '.join(map(str,ans)))

Submission status: Accepted

Solution code:
import numpy as np
def main():
    n = int(input())
    a = list(map(int, input().split()))

    ans_list = [0]*n

    for index, i in enumerate(a):
        ans_list[i-1] = str(index+1)
    
    ans = ' '.join(ans_list)
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

order = [None] * N

for i in range(N):
    order[A[i] - 1] = str(i + 1)

print(" ".join(order))

Submission status: Accepted

Solution code:
N = int(input())
dic = {}

for i, A_i in enumerate(map(int, input().split()), 1):
    dic[i] = A_i

dic_sorted = sorted(dic.items(), key=lambda x: x[1])

for i in range(N):
    print(dic_sorted[i][0], end=" ")

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
m = [0] * (n + 1)
for i in range(n):
  m[a[i]] = i + 1
print(*m[1:])

Submission status: Accepted

Solution code:
import numpy as np

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

B = np.argsort(A, axis=0)
B = [n+1 for n in B]

print(" ".join(map(str, B)))

Submission status: Accepted

Solution code:
n=int(input())
A=list(map(int, input().split()))
B=[0 for i in range(n)]
for i in range(n):
    B[i]=[A[i],i]
B=sorted(B)
ans=[0 for i in range(n)]
for i in range(n):
    ans[i]=str(B[i][1]+1)
print(' '.join(ans))

Submission status: Accepted

Solution code:
#ABC-142-C
N = int(input())
A = list(map(int, input().split()))
ans_dict = {}

for idx, item in enumerate(A):
    ans_dict[item] = idx+1
    
sorted_dict = sorted(ans_dict.items(), key = lambda x:x[0])

for i in sorted_dict:
    print(i[1], end = " ")

Submission status: Accepted

Solution code:
from operator import itemgetter
N = int(input())
A = list(map(int, input().split()))
B = sorted(enumerate(A, 1), key=itemgetter(1))
print(*list(map(itemgetter(0), B)))

Submission status: Accepted

Solution code:
N  = int(input())
S = input().split()
C = [0 for i in range(N)]
ans = ""
for i in range(N):
	C[int(S[i])-1] = i+1

for c in C:
	ans += str(c) + " "

print(ans)

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    n = int(input())
    a = list(map(int, input().split()))
    ans = [None] * (n + 1)
    for i, j in enumerate(a):
        ans[j] = i + 1
    print(*ans[1:])

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    n = int(input())
    a = list(map(int, input().split()))
    ans = [None] * n
    for i, j in enumerate(a):
        ans[j-1] = i + 1
    print(*ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

stu = []

for i in range(N):
    stu.append([i, A[i]])

stu = sorted(stu, key=lambda x: x[1], reverse=False)

for i in range(N):
    print(stu[i][0]+1)

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int,input().split()))
d=[0]*n
for i,val in enumerate(l):
  d[val-1]=i+1
print(*d)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
new_a = list("0"*len(a))

for i, a_i in enumerate(a):
    new_a[a_i-1] = str(i+1)
    
print(" ".join(new_a))

Submission status: Accepted

Solution code:
n=int(input())
A=list(map(int,input().split()))
t= [[i] for i in range(1,n+1)]
for i in range(n):
  t[i].append(A[i])
t1=sorted(t,key=lambda x: x[1])
for i in range(n-1):
  print(str(t1[i][0])+" ",end="")
print(t1[-1][0])

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
ans = sorted(range(len(A)), key=lambda k:A[k])
print(' '.join(list(map(lambda x:str(x+1), ans))))

Submission status: Accepted

Solution code:
N = int(input())
students = list(map(int, input().split()))
order = [None] * N

for i in range(N):
    order[students[i]-1] = str(i+1)
    
print(" ".join(order))

Submission status: Accepted

Solution code:
n=int(input())
A=list(map(int,input().split()))
B=sorted([[n,a] for n,a in enumerate(A,1)],key=lambda x:x[1])
R=[]
for r in B:
    R.append(r[0])
print(' '.join(map(str,R)))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
result = [0]*n

for i, j in enumerate(a, 1):
  result[j-1] = i

print(*result)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
result = [0]*N
for i in range(N):
    result[A[i]-1] = i+1
print(*result)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
for i in range(N):
  A[i] = (A[i], i+1)
A.sort()
print(*[x[1] for x in A])

Submission status: Accepted

Solution code:
from itertools import *
from math import *

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

for idx, ai in enumerate(A):
    invmat[ai] = idx + 1

print(" ".join(map(str, [invmat[i + 1] for i in range(N)])))

Submission status: Accepted

Solution code:
N = int(input())

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

R = [None for _ in range(N)]

for i in range(0, N):
    R[A[i] - 1] = i + 1

for i in R:
    print(i, end = " ")

Submission status: Accepted

Solution code:
n = int(input())
arr = list(map(int,input().split()))

arr2 = []

for i in range(n):
	arr2.append([arr[i],i+1])

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

ans =[]

for j in range(n):
	ans.append(arr2[j][1])

arrr = ' '.join(str(k) for k in ans)
print(arrr)

Submission status: Accepted

Solution code:
n = int(input().strip())
a_s = [int(s) for s in input().split()]

ret = [0] * n

for i, a in enumerate(a_s):
  ret[a - 1] = i + 1

print(' '.join([str(r) for r in ret]))

Submission status: Accepted

Solution code:
import numpy as np
N=int(input().strip())
A=np.array(list(map(int,input().strip().split())))
ans=[0]*N
for i in range(N):
    ans[A[i]-1]=i+1
for i in range(N):
    print(ans[i], end=" ")

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
x=[[a[i],i+1] for i in range(n)]
x.sort()
b=[str(x[j][1]) for j in range(n)]
ans=" ".join(b)
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
B = [0 for i in range(N)]
for i in range(N):
    B[A[i]-1] = i+1
print(*B)

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
a = list(map(int,input().split()))
answer = np.argsort(a) +1
print(*answer)

Submission status: Accepted

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

x = [0] * n

for i in range(n):
    x[a[i]-1] = i + 1

print(*x)

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
a = list(map(int,input().split()))
ans = list(np.argsort(a)+1)
for i in range(len(ans)):
    if i == N-1:
        print(ans[i])
    else:
        print(ans[i],end=' ')

Submission status: Accepted

Solution code:
#ABC142-C Go to School
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))#ここは簡略化できそう
ans =list(A.argsort() + 1)
print(' '.join(map(str,ans)))#listを 3 2 1 8 みたいな表記にする方法

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
a_id = []
for i in range(len(a)):
    a_id.append([a[i], i + 1])
a_id.sort()
for i in range(len(a_id)):
    print(a_id[i][1], end = ' ')

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int, input().split()))
P = [0]*N

for no, order in enumerate(L, 1):
    P[order - 1] = no

print(*P)

Submission status: Accepted

Solution code:
N = int(input())
A = list(int(x) for x in input().split())
d = {}

for i in range(N):
    d[i] = A[i]
d_sorted = sorted(d.items(), key=lambda x:x[1])
for key, value in d_sorted:
    print(key+1, end=" ")

Submission status: Accepted

Solution code:
n=int(input())
L=list(map(int,input().split()))
LL=[0]*n
for i in range(n):
    LL[L[i]-1]=i+1
print(*LL)

Submission status: Accepted

Solution code:
n = int(input())
a = map(int, input().split())

for i, x in sorted(enumerate(a), key=lambda x:x[1]):
	print(i+1)

Submission status: Accepted

Solution code:
N = int(input())
A = [int(_) for _ in input().split()]

X = [None for _ in range(N)]
for i, a in enumerate(A):
    X[a-1] = str(i+1)
print(" ".join(X))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

N = int(input())
A = {}
for i, order in enumerate(map(int, input().split())):
    A[i] = order

A_sorted = sorted(A.items(), key=lambda x:x[1])

for i in A_sorted:
    print("{} ".format(i[0]+1), end='')

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# coding: utf-8
import sys
# 整数 > 整数型
def I(): return int(input())

# 整数列 '1 2 3 4' > 整数型リスト
def IsIl(): return list(map(lambda x: int(x), input().split()))

# 改行挟む整数列　'1/n 2/n 3/n' > 整数型りすと
def InIl(n): return [input() for i in range(n)]

# 整数列 '1 2' > 整数型タプル
def IsIt(): return map(lambda x: int(x), input().split())

# 改行挟む整数列　'1\n 2\n 3\n' > 整数型たぷる
def InIl(n): return map(input() for i in range(n))

# 文字列 'abcd' > 文字型リスト
def SsSl(): return list(map(lambda x: x, input()))

# 整数 '1234' > 整数型リスト

# 文字列 'aba' > 辞書（文字型:個数）{'a':2,'b':1}
def SSd():
    from collections import defaultdict
    A = input() # [int(i) for i in input().split()]
    dd=defaultdict(int)
    for a in A:
        dd[a]+=1
    return dd

#リストにn個要素を読み込む

# その他アルゴリズムテンプレート
# https://qiita.com/chun1182/items/ddf2b6cba932b2bb0d4e
#from heapq import heappop, headpush
from heapq import heappop, heappush

n = I()

lis_a = IsIl()



q = []
for num, item in enumerate(lis_a):
    heappush(q,(item,num+1))

ans = ''
for num in range(n):
    a, num = heappop(q)
    ans += str(num)+' '


print(ans)

Submission status: Accepted

Solution code:
n = int(input())
zyun = list(map(int,input().split()))
stu = [0 for i in range(n)]
for i in range(n):
    stu[zyun[i]-1] = i+1
print(" ".join(map(str, stu)))

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int, input().split()))
b = [0]*N
# enumerate関数は指定のリストにインデックス番号を振ることが可能
for i, num in enumerate(L):
    b[num-1] = i+1
# *はリストの個々の要素を取り出すことが可能
print(*b)

Submission status: Accepted

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

ans=[]
for i in range(n):
    ans.append((a[i], i+1))
ans = sorted(ans, key=lambda x:x[0])

for i in range(n):
    print(ans[i][1], end=" ")

Submission status: Accepted

Solution code:
n = int(input())
*a, = map(int, input().split())

t = []
for i, j in zip(range(1, n+1), a):
    t.append((i, j))

ans = []
for i in sorted(t, key=lambda x: x[1]):
    ans.append(i[0])
print(" ".join(map(str, ans)))

Submission status: Accepted

Solution 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)

Submission status: Accepted

Solution code:
from operator import itemgetter

number_of_student = int(input())
student = list(map(int, input().split()))


recontructed = [
    t[0] + 1 for t in sorted(enumerate(student), key=itemgetter(1))]

print(*recontructed)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
b = {}
for i in range(n):
    b[a[i]] = i+1
for i in range(1,n+1):
    print(b[i] , end =' ')
print('')

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
b=[-1]*n
for i,j in enumerate(a):
  b[j-1]=i+1
print(*b)

Submission status: Accepted

Solution code:
n = int(input())
s = [[i, j] for i, j in zip(map(int, input().split()), range(1, n+1))]
s = sorted(s, key=lambda x: x[0])
for i in range(n):
    print(s[i][1], end=" ")
print()

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
ans=[0 for _ in range(n)]
for i in range(n):
  ans[a[i]-1]=i+1
print(*ans)

Submission status: Accepted

Solution code:
import numpy as np

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

order = np.argsort(A) + 1
print(" ".join(map(str, order)))

Submission status: Accepted

Solution code:
n = int(input())
a = map(lambda x : int(x),input().split())

ans = [0]*n
x = 1
for i in a:
    ans[i-1] = x
    x+= 1
print(*ans)

Submission status: Accepted

Solution code:
n = int(input())
lst = sorted([[i + 1, int(v)] for i, v in enumerate(input().split())], key=lambda x: x[1])

print(*[v[0] for v in lst])

Submission status: Accepted

Solution code:
_ = input()
s = map(int,input().split())
ans = []
di = {}
for ind,num in enumerate(s):
    di[num] = ind+1
for key,value in sorted(di.items(),key=lambda x:x[0]):
    ans.append(str(value))
print(" ".join(ans))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
index_St = sorted([[i+1,x] for i,x in enumerate(A)],key=lambda elem: elem[1])
A = [i[0] for i in index_St]
print(" ".join(list(map(str,A))))

Submission status: Accepted

Solution code:
from operator import itemgetter

N = int(input())
A = list(map(int,input().split()))
index_A = sorted([[i+1,x] for i,x in enumerate(A)],key=itemgetter(1))
A = [i[0] for i in index_A]

print(" ".join(list(map(str,A))))

Submission status: Accepted

Solution code:
import numpy as np
N=int(input())
A=list(map(int,input().split()))
ans=np.zeros(N)
count=0
for i in A:
  ans[i-1]=count+1
  count+=1
for j in ans:
  print(int(j),end=" ")

Submission status: Accepted

Solution code:
N = int(input())
students = list(map(int, input().split()))
ans = [0] * N

for a, i in zip(students, range(1, N+1)):
  ans[a - 1] = i

print(*ans)

Submission status: Accepted

Solution code:
from numpy import argsort, array

def f(x):
	return str(x+1)

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

sort_index = list(map(f, argsort(a)))

print(' '.join(sort_index))

Submission status: Accepted

Solution code:
n = int(input())
As = list(map(int, input().split()))
ans = [0] * n
for a, i in zip(As, range(1, n+1)):
  ans[a - 1] = i
print(*ans)

Submission status: Accepted

Solution code:
from collections import OrderedDict
n = int(input())
a = list(map(int, input().split()))

key_value = {}
for i in range(1, n + 1):
	key_value[i] = a[i-1]
sorted_key_value = OrderedDict(sorted(key_value.items(), key=lambda x:x[1]))
stu_num_order = list(sorted_key_value.keys())
print(*stu_num_order)

Submission status: Accepted

Solution code:
N = int(input())
students = [int(i) for i in input().split()]

shusseki_dict = {}
for i in range(N):
    key = str(i+1)
    shusseki_dict.setdefault(key, '')
    shusseki_dict[key] = students[i]

sorted_shusseki = sorted(shusseki_dict.items(), key=lambda x:x[1])

sorted_students = [i[0] for i in sorted_shusseki]

print(' '.join(sorted_students))

Submission status: Accepted

Solution code:
N=int(input())
h=list(map(int,input().split()))
listH = []
cnt=1
ans=[]
for i in h:
  listH.append([i,cnt])
  cnt=cnt+1
listH.sort()
for j in listH:
  ans.append(j[1])

print(*ans)

Submission status: Accepted

Solution code:
N=int(input())
h=list(map(int,input().split()))
listH = []
cnt=1
ans=[]
for i in h:
  listH.append([i,cnt])
  cnt=cnt+1
listH.sort()
for j in listH:
  ans.append(j[1])

print(*ans)

Submission status: Accepted

Solution code:
from operator import itemgetter
n = int(input())
a = [(int(y),x) for x,y in enumerate(input().split())]
a.sort(key=itemgetter(0))
print(*[x[1]+1 for x in a], sep=' ')

Submission status: Accepted

Solution code:
N = int(input())
lists = list(map(int, input().split()))
#print(lists)
ans = [0]*N
for i, order in enumerate(lists):
    ans[order-1] = i+1
print(*ans)

Submission status: Accepted

Solution code:
import numpy as np
from operator import itemgetter
N = input()
a = np.array(input().split()).astype(int)
print(" ".join(np.array(sorted(np.array([a, np.arange(1, len(a)+1)]).T.tolist(), key = itemgetter(0),reverse=False)).T[1].astype(str)))

Submission status: Accepted

Solution code:
N = int(input())
A = []
a = list(map(int, input().split()))
for i in range(N):
    A.append((a[i], i))
A = sorted(A)
for i in range(N):
    print(A[i][1]+1, end=' ')
print("")

Submission status: Accepted

Solution code:
n = int(input())
shusseki = list(map(int, input().split()))
ans = []

for i in range(n):
    ans.append([shusseki[i], i+1])

ans = sorted(ans)

for i in range(n):
    print(ans[i][1], end=' ')

print()

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int, input().split()))
D={}
for i in range(N):
  D[A[i]]=i
if N==1:
  print(1)
else:
  for i in range(N-1):
    print(D[i+1]+1,end=" ")
  print(D[N]+1)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
anslist = [0] * n # 結果を収納するリスト。
for idx,elem in enumerate(a, start=1):
    anslist[elem - 1] = str(idx)
print(' '.join(anslist))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
B = list(range(1,N+1,1))
C = zip(A,B)
D = sorted(C)
a, b = zip(*D)
print(" ".join(str(x) for x in b))

Submission status: Accepted

Solution code:
print(*[i for i in{m:i+1for i,m in zip(range(int(input())),map(int,input().split()))}.values()])

Submission status: Accepted

Solution code:

import numpy as np
N = int(raw_input())
A = np.array(map(int, raw_input().split()))

order = np.argsort(A) + 1
print " ".join(["%d"%i for i in order])

Submission status: Accepted

Solution code:
[print(i,end=' ')for i in{m:i+1for i,m in zip(range(int(input())),list(map(int,input().split())))}.values()]

Submission status: Accepted

Solution code:
N = int(input())
members = list(map(int, input().split()))
junban = {}

for i,member in zip(range(N), members):
  junban[member] = i+1
  
for i in junban.values():
  print(i,end=' ')

Submission status: Accepted

Solution code:
from sys import stdin
input = stdin.readline

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

ans_lst=[None]*n
for i,h[i] in enumerate(h):
    ans_lst[h[i]-1]=i+1
print(*ans_lst)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
mydict = {}
for i in range(n):
    mydict[str(i+1)] = a[i]
mydict = sorted(mydict.items(), key= lambda x:x[1])
for j in range(n):
    print(mydict[j][0], end=' ')

Submission status: Accepted

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

L = [0] * N

for i, a in enumerate(A):
    L[a-1] = i + 1

print(*L)

Submission status: Accepted

Solution code:
# ABC 142 C go to school
n = int(input())
s = list(map(int,input().split()))

# ソートされたリストのインデックスを返す
s = sorted(range(len(s)), key=lambda k:s[k])
ans = [x+1 for x in s]
print(*ans)

Submission status: Accepted

Solution code:
n=int(input())
a=[0]*n
m=list(map(int,input().split()))
#print(m)
for i in range(n):
    a[m[i]-1]=i+1
for i in range(n):
    print(a[i],end=" ")

Submission status: Accepted

Solution code:
N = int(input())
l = list(map(int, input().split()))
ans = [0]*N

for i in range(N):
    ans[l[i]-1] = i+1
print(*ans)

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int, input().split()))
ans=[0]*n
for i in range(n):
  ans[l[i]-1] = i+1
print(*ans)

Submission status: Accepted

Solution code:
import sys

# import numpy as np
import math
from fractions import gcd
from collections import deque
import bisect

sys.setrecursionlimit(1000000)


def main():
    # map(int, input().split())
    # l = list(map(int, input().split()))

    N = int(input())
    A = list(map(int, input().split()))
    combi = list(zip(range(1, N+1), A))
    combi.sort(key=lambda x: x[1])
    for key in combi:
        print(key[0], end=' ')
    print('')


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(raw_input())
a = map(int, raw_input().split())
pair = []
for i in range(len(a)):
    pair.append([i+1, a[i]])

pair.sort(key=lambda x:x[1])
pair = map(lambda x:str(x[0]), pair)
print " ".join(pair)

Submission status: Accepted

Solution code:
n=int(input())
a=[int(i) for i in input().split()]
a1={}
for i in range(n):
  a1[a[i]]=i+1
a2=sorted(a1.items(),key=lambda x:x[1])
a2.sort()
a3=[i[1] for i in a2]
print(*a3)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
x = [(a[i], i + 1) for i in range(n)]
x.sort()
ans = [xi[1] for xi in x]
print(*ans)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
x = [(ai, i + 1) for i, ai in enumerate(a)]
x.sort()
ans = [xi[1] for xi in x]
print(*ans)

Submission status: Accepted

Solution code:
import operator

n = input()
s = [(int(v),i+1) for i,v in enumerate(input().split())]
s = sorted(s,key=operator.itemgetter(0))
total = ""
for si in s :
  total += str(si[1])+" "

total = total[:len(total)-1]
print(total)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
d = {a:i for i, a in zip(range(1, N+1), A)}

print(*d.values())

Submission status: Accepted

Solution code:
from operator import itemgetter

def main():
    N = int(input())
    A = [[i,int(a)] for i,a in zip(range(N),input().split())]
    A.sort(key = itemgetter(1))
    for i,a in A:
        print(i+1)

main()

Submission status: Accepted

Solution code:
n = int(input())
a=[]

b = list(map(int, input().split()))
for i in range(n):
    a+=[[i+1, b[i]] ]
    
    
import operator as op
a.sort(key = op.itemgetter(1))

x=""
for i in range(n):
    x+=str(a[i][0])
    if i!=n-1:
        x+=" "

print(x)

Submission status: Accepted

Solution code:
n = int(input())
# n,k = map(int,input().split())
a = list(map(int,input().split()))
ans = [0 for _ in range(n)]
for i in range(n):
  ans[a[i] - 1] = str(i + 1)
print(" ".join(ans))

Submission status: Accepted

Solution code:
N = input()
print(' '.join([i for A,i in sorted([(A,str(i+1)) for i,A in enumerate(list(map(int, input().split())))])]))

Submission status: Accepted

Solution code:
import sys
if sys.platform =='ios':
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline

N = int(input())
A = [int(x) for x in input().split()]

AS = [[a,idx+1] for idx,a in enumerate(A)]
AS.sort()

for a in AS:
	print(a[1], end=" ")

Submission status: Accepted

Solution code:
#coding: utf-8
import math
import heapq
import bisect

MOD = 10**9+7

N = int(input())

# 複数個の数値を、intの配列として取得
A = list(map(int, input().split()))

# (A[i],i)のタプルリストを作って、昇順ソート
L = []
for i,v in enumerate(A):
    a = tuple([i+1,A[i]])
    L.append(a)
L = sorted(L, key=lambda x:x[1])

for i in range(N):
    print(L[i][0])

Submission status: Accepted

Solution code:
#coding: utf-8
import math
import heapq
import bisect

MOD = 10**9+7

N = int(input())

# 複数個の数値を、intの配列として取得
A = list(map(int, input().split()))

# (A[i],i)のタプルリストを作って、昇順ソート
L = []
for i in range(N):
    a = tuple([A[i],i+1])
    L.append(a)
L = sorted(L, key=lambda x:x[0])

for i in range(N):
    print(L[i][1])

Submission status: Accepted

Solution code:
n = int(input())
arr = [[i + 1, int(v)] for i, v in enumerate(input().split())]
sorted_arr = list(map(lambda x: str(x[0]), sorted(arr, key=lambda x: x[1])))

print(" ".join(sorted_arr))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
for i in range(n):
  ans[a[i]-1] = i +1
for i in range(n):
  print(ans[i])

Submission status: Accepted

Solution code:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    n = int(readline())
    a = list(map(int, readline().split()))
    ans = []
    for i, v in enumerate(a):
        ans.append([i, v])
    ans.sort(key=lambda x: x[1])
    ls = []
    for i in range(n):
        ls.append(ans[i][0] + 1)
    print(*ls)


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

l = []

for i in range(1, n+1):
    l.append([a[i-1], i])

l.sort()

ans = []

for i in range(n):
    ans.append(l[i][1])

ans = list(map(str, ans))

print(" ".join(ans))

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
a = [int(i) for i in input().split()]
ans = np.zeros(n, dtype=int)
for i in range(n):
    s = a[i]
    ans[s-1] = i+1
print(" ".join([str(i) for i in ans]))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

N = int(input())
li = list(map(int,input().split()))
ans = [0] * N
for i in range(N):
    ans[li[i]-1] = i+1
for j in range(N):
    print(ans[j],end = ' ')

Submission status: Accepted

Solution code:
n = int(input())
A = map(int, input().split())
I = sorted(enumerate(A), key=lambda x: x[1])
print(' '.join([str(i+1) for i, a in I]))