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())
lis = [0]*N
for i, a in enumerate(input().split()):
    lis[int(a)-1] = str(int(i)+1)
print(' '.join(lis))

Submission status: Accepted

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

values = [int(i) for i in range(1,len(A)+1)]
A_list = dict(zip(A, values))
ans = []
for i in range(1,N+1):
  ans.append(A_list[i])
print(" ".join(map(str,ans)))

Submission status: Accepted

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

ans = [0]*N
for i,a in enumerate(A):
    ans[a-1] = i+1
print(' '.join(map(str,ans)))

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

print(*Ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
a = [0 for _ in range(N)]

for i in range(N):
    a[A[i]-1] = i
for i in range(N):
    print(a[i]+1, end=' ')

Submission status: Accepted

Solution code:
from collections import OrderedDict
if __name__ == "__main__":
    N = int(input())
    A = list(map(int, input().split()))

    dic = OrderedDict(zip(A, range(1, N+1)))

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

Submission status: Accepted

Solution code:
import sys
import math
from copy import deepcopy
from collections import deque, defaultdict
from operator import mul
from functools import reduce
sys.setrecursionlimit(20000000)

# input = sys.stdin.readline


def main():
    n = int(input())

    stu = defaultdict(int)

    count = 1
    for o in input().split():
        stu[count] = int(o)
        count += 1

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

    ans = []
    for s in stu:
        ans.append(s[0])

    print(*ans, sep=' ')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

order = [idx for idx, value in sorted(enumerate(A), key=lambda item: item[-1])]

for idx in order:
    print(idx+1, end=' ')

Submission status: Accepted

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

ans=[0]*N
for i in range(1,N+1):
  ans[A[i-1]-1]=i
  
print(" ".join(map(str,ans)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
N = int(input())
A = [int(v) for v in sys.stdin.readline().split()]

Ax = list(zip(range(1, N + 1), A))
#print(Ax)
Ax.sort(key = lambda x: x[1])
#print(Ax)
result = [r[0] for r in Ax]
for r in result:
    print(str(r) + ' ', end="")
print()

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
lists = list(range(1,N+1))
c = list(zip(A,lists))
c.sort()
ans,m = zip(*c)
ans_str = map(str,m)
mojiretu = " ".join(ans_str)
print(mojiretu)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : map(int, stdin.readline().split())

def main():
  n = ni()
  a = list(na())
  d = {}
  for i, a in enumerate(a):
    d[a] = i+1
  res = []
  for i in range(n):
    res.append(d[i+1])
  print(*res)

main()

Submission status: Accepted

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

#print(N,As)

tAs = []
for i,A in enumerate(As):
	tAs.append((A,i+1))
	
tAs = sorted(tAs, key=lambda x: x[0])

for tA in tAs:
	print(tA[1],end=" ")
print()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
import numpy as np
A = np.array(A)
result = A.argsort()
for i,r in enumerate(result):
    if i+1 == N:
        print(r+1)
    else:
        print(r+1,end=' ')

Submission status: Accepted

Solution code:
num = int(input())
list = [int(item) for item in input().split()]

order = dict(zip(range(1,num+1), list))
p_order = sorted(order.items(), key=lambda x:x[1])



for i in [item[0] for item in p_order][:-1]:
    print(str(i) + ' ', end='')
print([item[0] for item in p_order][-1])

Submission status: Accepted

Solution code:

N = int(input())

split = input().split(" ")
Ai = {}

for i in range(N):
  Ai[split[i]] = i+1

  
for i in range(N):
  print(Ai[str(i+1)], end=" ")

Submission status: Accepted

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

stu = [0] * n

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

print(*stu)

Submission status: Accepted

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

dic = {}
for i in range(1, len(s)+1):
    dic[i] = s[i-1]

result = sorted(dic.items(), key=lambda x: x[1])
result = [str(d[0]) for d in result]
print(' '.join(result))

Submission status: Accepted

Solution code:
import sys

n = int(sys.stdin.readline())
a = list(map(int, sys.stdin.readline().split()))
b = [0]*n

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

Submission status: Accepted

Solution code:
N = int(input())

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

mycnt = 0

myans = [0 for n in range(N+1)]

for i in range(N):
    myans[mylist[i]] = i+1
    #print(myans)
    
print(' '.join(map(str,myans[1:])))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
numlist = [n+1 for n in range(N)]
atlist = [[x,y] for x, y in zip(A, numlist)]

sortlist = sorted(atlist)
print(' '.join(map(str, [x[1] for x in sortlist])))

Submission status: Accepted

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

Submission status: Accepted

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

l=[]
for i in range(n):
  l.append([s[i],i])

l.sort()

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

Submission status: Accepted

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

d = list(range(1,n+1)) 
s = []
count = 1

c = zip(t, d)

c = sorted(c)

t, d = zip(*c)




print(*d)

Submission status: Accepted

Solution code:
N = int(input())

students = [[(i+1)] for i in range(N)]

A = list(map(int, input().split()))
for i in range(N):
    students[i].append(A[i])

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

ans = ""
for student in students:
    ans += str(student[0]) + " "
    
ans = ans.rstrip()

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
p = []
for i,j in enumerate(a):
    p.append([i,j])
p.sort(key=lambda x:x[1])
for i in p:
    print(i[0]+1)

Submission status: Accepted

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

kl = {str(i):v for i,v in enumerate(l)}

ans = sorted(kl.items(), key=lambda x:x[1])
for i in ans:
    print(int(i[0])+1, end=" ")

Submission status: Accepted

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

_a = []
for i in range(len(A)):
  _a.append([i+1, A[i]])
srt_a = sorted(_a, key=lambda x:x[1])

ans = []
for aa in srt_a:
  ans.append(aa[0])
print(*ans)

Submission status: Accepted

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

Ans = list(range(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()))
ans = []
tmp = 0
for hoge in range(n):
         ans.append(0)
for i in range(n):
         tmp = a[i]-1
         ans[tmp] = i+1
print(*ans)

Submission status: Accepted

Solution code:
def solve():
    N = int(input())
    input_temp = list(map(int, input().split()))
    dictionary = {}
    for i in range(N):
        dictionary[input_temp[i]] = i+1

    for i in range(1,N+1):
        print(dictionary[i],end=" ")
    print("")

solve()

Submission status: Accepted

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

Submission status: Accepted

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

new_a = []
for i in range(n):
    new_a.append([i + 1, a_li[i]])

new_a.sort(key=lambda x:x[1])
for i in range(n):
    print(new_a[i][0], end="")
    if i != n - 1:
        print(" ", end="")

Submission status: Accepted

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

d = dict()
for i in range(N):
    d[i + 1] = A[i]

for k, v in sorted(d.items(), key=lambda  x: x[1]):
    print(str(k), end=" ")

Submission status: Accepted

Solution code:
N = input();
A = list(map(int, input().split()))
A_map = {}
i = 0
for a in A:
  A_map[i+1] = a
  i += 1

res = []
for k, v in sorted(A_map.items(), key=lambda x: x[1]):
  print(k, end=" ")

Submission status: Accepted

Solution code:
N = int(input())
A = map(int, input().split())
result = [0] * N
for i, j in enumerate(A):
    result[j-1] = i + 1
print(' '.join(map(str, result)))

Submission status: Accepted

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

vR = [""] * N

for i, a in enumerate(vA):
    vR[a-1] = str(i + 1)

print(" ".join(vR))

Submission status: Accepted

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

a.insert(0,0)
result = []

tmp = []
for i in range(N+1):
  tmp.append([a[i],i])

tmp_sorted = sorted(tmp)

for i in range(1,N+1):
  result.append(tmp_sorted[i][1])

print(*result)

Submission status: Accepted

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

from collections import defaultdict
d = defaultdict(list)

for i in range(n):
    d[a[i]] = i 

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
a = np.array([int(i) for i in input().split()])
print(" ".join([str(i+1) for i in np.argsort(a)]))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
b = [i+1 for i in range(n)]
a_dict = dict(zip(a, b))
ans = [''] * n
for i, (a_, b_) in enumerate(sorted(a_dict.items())):
    ans[i] = str(b_)
print(' '.join(ans))

Submission status: Accepted

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

res = [0]*n
for i in range(n):
    res[a[i]-1] = i+1
for e in res:
    print(e,end = ' ')

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


def main():
    n = int(input())
    a_list = list(map(int, input().split()))
    print(" ".join(map(str, sorted(range(1, n + 1), key=lambda x: a_list[x - 1]))))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

C=sorted(B,key=lambda x:x[1])

for i in range(N):print(str(C[i][0])+' ',end="")

Submission status: Accepted

Solution code:
n = int(input())
men = enumerate(list(map(int,input().split())))
ans = []
for index, item in enumerate(sorted(men,key=lambda x: x[1])):
    if index < n-1:
        print(item[0]+1, end=" ")
    else:
        print(item[0]+1)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
H = [[0] * 2 for i in range(N)]
for i in range(N):
    H[i][0] = i+1
    H[i][1] = A[i]
H.sort(key=lambda x:x[1])
ans = [0]*N
for i in range(N):
    ans[i] = H[i][0]
print(' '.join(map(str, ans)))

Submission status: Accepted

Solution code:
n=int(input())
an=list(map(int,input().split()[:n]))
bn=[]
for i,j in enumerate(an):
    bn.append((i+1,j))
bn.sort(key=lambda x:x[1])
for i in bn:
    print(i[0],end=" ")

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
A = list(map(int, input().split()))
print(" ".join(map(str, np.argsort(A)+1)))

Submission status: Accepted

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

s = [0] * n

for i, a in enumerate(A, 1):
    s[a-1] = str(i)
    
print(' '.join(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
src = list(map(int, input().split()))
ma = {}
for i,s in enumerate(src):
    ma[s-1] = i+1
print(*(list(ma.values())))

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
R = ['0'] * len(A)

for i in range(len(A)):
    r = A[i] - 1
    R[r] = str(i + 1)

# print(R)
print(" ".join(R))

Submission status: Accepted

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

def main():
    N = int(input())
    A = map(int, input().split())
    X = list(map(lambda a: a[1],
                 sorted((int(a), i+1) for i, a in enumerate(A))))

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




if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
def input() -> str:
    return sys.stdin.readline()
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
dict_ = {i: a for i, a in enumerate(A)}
list_ = []
for k, v in sorted(dict_.items(), key=lambda x: x[1]):
    list_.append(str(k+1))
str_ = ' '.join(list_)
print(str_)

Submission status: Accepted

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

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

A_sorted = sorted(A_dict.items(), key=lambda x:x[1])
a = []
for i in A_sorted:
    a.append(int(i[0]))

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

Submission status: Accepted

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

result = [None] * N
for i in range(1, N + 1):
    index = a_list[i - 1]
    result[index - 1] = i
print(" ".join(map(str, result)))

Submission status: Accepted

Solution code:
from operator import itemgetter
n = int(input())
a = list(map(int,input().split()))
b=[]
for i in range(n):
    b.append([i,a[i]])
c = sorted(b, key=itemgetter(1), reverse=False)
d=[]
for i in range(n):
    d.append((str(c[i][0]+1)))
print(" ".join(d))

Submission status: Accepted

Solution code:
n = int(input())
al = list(map(int, input().split()))
dic = {}

for an, a in enumerate(al):
  dic[a] = an + 1
  
ans = ''

for ns in range(n):
  ans += str(dic[ns+1]) + ' '
  
print(ans.strip())

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
A_list = [int(i) for i in input().split()]

arg = np.argsort(A_list)
for i in arg:
  print(i+1)

Submission status: Accepted

Solution code:
N = int(input())
students = sorted([(int(j), i+1) for i, j in enumerate(input().split())], key=lambda t: t[0])

print(*[s[1] for s in students])

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,(input().split())))
B=list(range(1,N+1))
H=[]
for a,b in zip(A,B):
  H.append((a,b))
ans=[]
for i in sorted(H):
  ans.append(i[1])
print(*ans)

Submission status: Accepted

Solution code:
N = int(input())
ans = [0]*N
A = [int(n) for n in input().split()]
for i,student in enumerate(A):
    ans[student-1] = i+1
for chat in ans:
    print(str(chat)+" ",end="")

Submission status: Accepted

Solution code:
from heapq import heappush, heappop

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

order = []

for i, s in enumerate(students):
  heappush(order, (s, i))

print(*[heappop(order)[1] + 1 for x in range(n)])

Submission status: Accepted

Solution code:
# C
import numpy as np
N = int(input())
lst = list(map(int,input().split()))
a_2d = np.array(lst)
ans = np.argsort(a_2d, axis=0)
a = []
for i in ans:
    a.append(str(i+1))
print(" ".join(a))

Submission status: Accepted

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

dic = {}
for i in range(N):
    dic[i] = A[i]
dic_swap = {v: k for k, v in dic.items()}
dic_swap_sorted = sorted(dic_swap.items())

order = []
for tap in dic_swap_sorted:
    order.append(tap[1] + 1)

print(*order)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
a_list = list(map(int, input().split()))
dic = {}
for i in range(N):
    dic[i+1] = a_list[i]
dic_sorted = sorted(dic.items(), key=lambda x: x[1])
ans = " ".join(["{0}".format(key) for (key, value) in dic_sorted])
print(ans)

Submission status: Accepted

Solution code:
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import bisect
import sys
import logging
import heapq
logging.basicConfig(level=logging.DEBUG)

input = sys.stdin.readline

setrecursionlimit(1000000)

MOD = 10**9+7

def __lt__(self, other):
    return self[0] < other[0]

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

    ans=[]
    heapq.heapify(ans)
    for i in range(len(A)):
        t=(A[i], i+1)
        heapq.heappush(ans, t)
    
    while ans:
        a = heapq.heappop(ans)
        print(a[1]) 
main()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict
from collections import deque
from string import ascii_uppercase
import sys, bisect, math, heapq

stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

N = read_int()[0]
A = read_int()
A2d = [[A[i], i + 1] for i in range(N)]

def solve():
    ans = 0
    A2d.sort(key=lambda x: x[0], reverse=False)
    # print(A2d)
    return

if __name__ == "__main__":
    solve()
    for a in A2d:
        print(a[1], end=" ")
    print()

Submission status: Accepted

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

dict = {}
for i in range(n):
  dict[a[i]] = i+1
  
for i in range(n):
  print(dict[i+1], end = " ")

Submission status: Accepted

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

B=[]
for i in range(N):
    B.append([A[i]])

for i in range(N):
    B[i].append(i+1)

B.sort()

for i in range(N):
    print(B[i][1],end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
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(v) for v in input().split(' ')]
sorted_index = [str(v + 1) for v in sorted(range(len(A)), key=lambda i: A[i])]

print(" ".join(sorted_index))

Submission status: Accepted

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

ans = [0]*n

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

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
info = []
for k in range(N):
    info.append([a[k], int(k+1)])
info = sorted(info, key=lambda x: x[0])
for i in range(N):
    print(info[i][1], end=" ")

Submission status: Accepted

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

import sys

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
#        for line in sys.stdin:
#            lines.append(line)
        lines.append(input())
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    n = [int(e) for e in lines[0].split(" ")]

    a = [int(e) for e in lines[1].split(" ")]

    return (n, a)


def solve(n, a):


    b = [(i+1, e) for i, e in enumerate(a)]

    b.sort(key=lambda e: e[1])

    c = [e[0] for e in b]

    return c


def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, end=' ')
    else:
        print("%s" % result)

if __name__ == '__main__':

    main()

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    a = list(map(int, input().split()))
    ans = []
    a = {i: k for i, k in enumerate(a, start=1)}
    a = sorted(a.items(), key=lambda a: a[1])
    for i in a:
        ans.append(i[0])

    print(*ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

import copy

ans_num = copy.deepcopy(nums)

for i in range(n):
    f_n = nums[i]
    ans_num[f_n -1] = i +1
    
map(str,ans_num)
print(' '.join(map(str,ans_num)))

Submission status: Accepted

Solution code:
n = int(input())
a = [[int(i)] for i in input().split()]
for i in range(n):
    a[i].append(i)
a.sort()
ans = ""
for i in range(n):
    ans += str(a[i][1]+1) + " "
print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8

def main():
    N = int(input())
    num_to_order = [0 for _ in range(N)]

    for student_no, come_order in enumerate(input().split()):
        num_to_order[int(come_order)-1] = str(student_no + 1)
    
    print(' '.join(num_to_order))

main()

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    N = int(input())
    ans = [0]*N
    a = list(map(int,input().split()))
    for i in range(N):
        ans[a[i]-1] = i+1
    print(*ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
s=sorted(a)
for bangou,index in enumerate(a):
	#print("{0}:{1}".format(bangou+1,index-1))
	s[index-1]=bangou+1
for i in range(n):
  print(s[i],end=" ")

Submission status: Accepted

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

l = []
for i, a in enumerate(al, start=1):
  l.append((str(i), a))
print(" ".join([i[0] for i in sorted(l, lambda x: x[1])]))

Submission status: Accepted

Solution code:
def solve_c(n, a_list):
    res_list = [0] * n
    for i in range(n):
        res_list[a_list[i] - 1] = i + 1
    return res_list


def main():
    n = int(input())
    a_list = list(map(int, input().split()))
    res_list = solve_c(n, a_list)
    print(" ".join([str(r) for r in res_list]))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N=int(input())
keys=[i for i in range(1,N+1)]
values=list(map(int,input().split()))
dic=dict(zip(keys, values)) 
a=[k for k, v in sorted(dic.items(), key=lambda x:x[1])]
print(" ".join(repr(e) for e in a))

Submission status: Accepted

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

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

print(*B)

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
dic = {}
for i in range(N):
    dic[i+1] = 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()))
d = {}
for i in range(n):
  d[a[i]] = i
print(" ".join([str(d[key] + 1) for key in sorted(d.keys())]))

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):
    a = A[i]
    ans[a-1] = i+1


for k in range(N):
    print(ans[k], end = " ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

N=int(sys.stdin.readline().rstrip())
AList=list(map(int,sys.stdin.readline().split()))

ans=[0]*N
for i in range(N):
  ans[AList[i]-1]=i+1
    
print(' '.join(map(str, ans)))

Submission status: Accepted

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

print(b[1],end="")
for i in range(2,n+1):
  print(' ' + str(b[i]) ,end="")
print("")

Submission status: Accepted

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

a = []
for i, num in enumerate(A):
    a.append((i+1, num))

a = sorted(a, key=lambda a: a[1])
ans = []
for i in range(N):
    ans.append(a[i][0])
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

list = [-1]*n
for i in range(n):
    list[a[i] - 1] = i+1
# print(list)
print(list[0], end="")
for i in range(1, n):
    print(" ", end="")
    print(list[i], end="")

Submission status: Accepted

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

new_list = []

for i in range(N):
    new_list.append((A[i],i+1))

new_list = sorted(new_list)

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np
def main():
    N = int(input())
    A = list(map(int,input().split()))
    An = np.argsort(A)
    for i in An:
        print(i+1,end = " ")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#import numpy as np

    
##################################################################

if __name__ == "__main__":
    Input1 = [input() for i in range(2)]
    N = int(Input1[0])
    A = list(map(int,Input1[1].split()))

    B = [0]*N
    for i in range(N):
        temp = A[i]
        B[temp-1] = i+1
    print(' '.join(map(str,B)))

Submission status: Accepted

Solution code:
import numpy as np

if __name__ == '__main__':
    N = int(input())
    a = list(map(int, input().split()))

    s = ' '.join(list(map(str, np.argsort(a) + 1)))
    print(s)

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
for i in range(n):
  print(b[i], end=" ")

Submission status: Accepted

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

ans = [0]*n

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

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

Submission status: Accepted

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

tmp = []

for i, num in enumerate(inp, 1):
    tmp.append(list((i,num)))

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

ans = []
for i in range(n):
    ans.append(str(tmp[i][0]))
    
print(" ".join(ans))

Submission status: Accepted

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

answer = [0] * N
temp = []

for i in range(0, N):
    temp.append([i + 1, A[i]])

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

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

Submission status: Accepted

Solution code:
N=int(input())
A=[[int(x)] for x in input().split()]
i=1
for a in A:
    a.append(i)
    i+=1
A.sort()
print(*[a[1] for a in A])

Submission status: Accepted

Solution code:
import sys,queue,copy
sys.setrecursionlimit(10**8)
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

N = int(input())
A = inpl()
Adic = {}
for i in range(1,N+1):
    Adic[i] = A[i-1]

Adic_sorted = sorted(Adic.items(), key=lambda x:x[1])

anslist=list()
for a,b in Adic_sorted:
    anslist.append(str(a))

print(" ".join(anslist))

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())
H = input().split()

correct = np.zeros(N)

for i in range(N):
    correct[int(H[i]) - 1] = i + 1

for i in range(N):
    print(int(correct[i]), end = " ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import numpy as np
def main():
    input = sys.stdin.readline
    N = int(input())
    As = list(map(int, input().split()))
    ans = " ".join(list((np.argsort(As)+1).astype("str")))
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# coding: utf-8

N = int(input())
keys = [_ + 1 for _ in range(N)]
values = list(map(int,input().split()))
dct = dict(zip(keys, values))
prt = []
for k, v in sorted(dct.items(), key=lambda x: x[1]):
    prt.append(str(k))

for i in range(len(prt)):
    if i != len(prt) - 1:
        print(int(prt[i]), end = " ")
    else:
        print(int(prt[i]))