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

l = [0] * n

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

print(*l)

Submission status: Accepted

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

ans = [0]*n

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

print(' '.join(ans))

Submission status: Accepted

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

A_dict = {}

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

print(*[x[0] for x in sorted(A_dict.items(), key=lambda x:x[1])])

Submission status: Accepted

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

ans = [0]*n

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

print(' '.join(ans))

Submission status: Accepted

Solution code:
import numpy as np
def resolve():
    N = int(input())
    A = np.array(list(map(int,input().split())))
    ans = (np.argsort(A) + 1)
    print(*ans)
resolve()

Submission status: Accepted

Solution code:
import numpy as np
def resolve():
    N = int(input())
    A = np.array(list(map(int,input().split())))
    ans = (np.argsort(A) + 1)
    for i in ans:
        print(i, end =" ")
resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(N: int, A: "List[int]"):
    order = [(i, a) for i, a in enumerate(A)]
    order = sorted(order, key=lambda x: x[1])
    ans = [o[0] + 1 for o in order]
    print(*ans)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N=int(input())
A={i:a for (i, a) in enumerate(list(map(int, input().split())),1)}
B=sorted(A.items(), key=lambda A:A[1])
for i in range(N):
    print(B[i][0],end=" ")

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    A = list(map(int, input().split()))
    lis = []
    for i, num in enumerate(A):
        lis.append([i + 1, num])
    #print(lis)

    B = sorted(lis, key=lambda x: x[1])
    #print(B)

    for x, _ in B:
        print(x, end=" ")

if __name__ == "__main__":
    main()

Submission status: Accepted

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

b = [0] * n
for i,data in enumerate(a):
  b[data-1] = str(i+1)

print(' '.join(b))

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

# In[21]:


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


# In[22]:


A_s = sorted(enumerate(A), key=lambda x: x[1], reverse=False)
# print(A_s)
odr = [str(idx+1) for idx,x in A_s]
print(" ".join(odr))


# In[ ]:

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n = int(input())
a = list(map(int, input().split()))
ans = [0]*n
for i in range(n):
    ans[a[i] - 1] = i + 1
for j in ans:
    print(j)

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()))
ans = {}
ans = {a[i]:i for i in range(n)}
for i in range(1,n+1):
    print(ans[i]+1,end=" ")
print()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,*a=map(int,open(0).read().split())
s=[[j,i] for i,j in zip(range(1,n+1),a)]
s.sort()
print(*[i[1] for i in s])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    n = int(input())
    a = list(map(int, input().split()))

    summary = []

    for i in range(n):
        summary.append([a[i], i])

    summary.sort()

    print(*[summary[i][1] + 1 for i in range(n)])


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
ans = list()
d = dict()
for i, a in enumerate(A):
  d[a] = i+1
for i in range(1,N+1):
  ans.append(d[i])
print(*ans)

Submission status: Accepted

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


D = dict(zip(A, list(range(1, n+1))))
L = sorted(D.items())
for s in L:
    print(s[1], '', end='')

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(raw_input())
elems = [(e,i) for i,e in enumerate(map(int, raw_input().split(' ')))]
elems.sort()
for a,b in elems:
	print b+1,

Submission status: Accepted

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


b.sort()

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

Submission status: Accepted

Solution code:
N = int(input())
A = [[0 for _ in range(2)] for _ in range(N)]
tmp = input().split()
for n in range(N):
    A[n][0] = int(tmp[n])
    A[n][1] = n

A.sort()
T =[]
for n in range(N):
    T.append(A[n][1]+1)

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
b = [0]*n
for i in range(n):
    b[i] = [a[i], i+1]
sortf = lambda val : val[0]
b.sort(key=sortf)
for i in range(n):
    print(str(b[i][1]) + " ",end="")
print("")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A =[int(a) for a in input().split()]
AL=[]
for i,a in enumerate(A):
    AL.append([i+1,a])
AL.sort(key=lambda x:x[1])
AL = [a[0]for a in AL]
ans =""
for a in AL:
    ans+=str(a)+" "
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
ans = {}
for i in range(N):
    ans[i+1] = A[i]
ans = sorted(ans.items(), key=lambda x:x[1])
ans2 = []
for i in ans:
    ans2.append(i[0])
print(*ans2)

Submission status: Accepted

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

B = [0] * N

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

O = [0 for i in range(N)]

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

print(" ".join(O))

Submission status: Accepted

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

b = np.argsort(a)
for i in b:
    print(i + 1, end=' ')
print()

Submission status: Accepted

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

student_turn = [0] * (n + 1)
for i in range(n):
  student_turn[a[i] - 1] = i + 1
student_turn.pop()
print(" ".join(map(str,student_turn)))

Submission status: Accepted

Solution code:
n = int(input())
a = [[int(m),i] for i, m in enumerate(input().split())]
a.sort(key=lambda x: x[0])
ans = [i[1]+1 for i in a]
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
arr=[int(i) for i in input().split()]
dic={}
for i in range(n):
    dic[arr[i]]=i+1
ans=[]
for i in range(1,n+1):
    ans.append(dic[i])
for i in ans:
    print(i,end=" ")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
A = {num: i+1 for i,num in enumerate(map(int, input().split()))}

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


def main():
    _ = int(readline())
    As = list(map(int, readline().split()))
    order = np.argsort(As)
    order = [str(o + 1) for o in order]
    print(' '.join(order))


if __name__ == '__main__':
    main()

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])
b.sort()
d=[]
for i in range(n):
  d.append(b[i][1]+1)
print(*d)

Submission status: Accepted

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

for t in d:
    print (t[1], end=" ")

Submission status: Accepted

Solution code:
N = int(input())
A = list(input().split())
A = [int(i) for i in A]
j = 1
ans = [0]*N
#print(N, A, ans)

for i in A:
    ans[i-1] = j
    j +=1
#print(ans)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
A=[int(x) for x in input().rstrip().split()]
ans=[0 for i in 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().strip().split()))

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

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

Submission status: Accepted

Solution code:
def li():
    return list(map(int, input().split()))


def mi():
    return map(int, input().split())


def ii():
    return int(input())


N = ii()
A = li()

d = {}

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

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

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

Submission status: Accepted

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

ans = [-1 for _ in range(N)]

for i in range(N):
    ans[A[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:
N=int(input())
A=list(map(int,input().split()))
ANS=[]
for i in range(N):
    ANS+=[[A[i],i+1]]
ANS.sort()
for i in range(N):
    print(ANS[i][1], end=' ')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
ANS=[]
ANS2=[]
for i in range(N):
  ANS+=[[A[i],i+1]]
ANS.sort()
for i in range(N):
  ANS2+=[str(ANS[i][1])]
ans=" ".join(ANS2)
print(ans)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)

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

d = {}

for k,v in enumerate(a):
    d[v] = k+1

ans = list(d.values())
    
print(*ans)

Submission status: Accepted

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

w=""
for i in range(n):
    if(i==(n-1)):
        break
    w += (str(ans[i]) + " ")

w += str(ans[n-1])
print(w)

Submission status: Accepted

Solution code:
def go_to_school(n, ali):

    ans = [0]*n

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

    return ans

def main():
    n = int(input())
    ali = list(map(int, input().split()))
    print(*go_to_school(n, ali))

if __name__ == '__main__':
    main()

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())
b=['']*n
a=list(map(int,input().split()))
for i in range(n):
    b[a[i]-1]=str(i+1)
print(' '.join(b))

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int, input().split()))
d={}
ans = []
for i in range(len(A)):
	d[A[i]]=i+1
d=sorted(d.items())
for _ in d:
	ans.append(str(_[1]))
ans = " ".join(ans)
print(ans)

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
a=[]
for i in range(1,N+1):
    a.append(str(D[i]))
b=" ".join(a)
print(b)

Submission status: Accepted

Solution code:
N=int(input())
A=[int(a) for a in input().split()]
B=[[A[i],int(i+1)] for i in range(N)]
B=sorted(B)
ANS=[]
for i in range(N):
    ANS.append(B[i][1])
print(*ANS)

Submission status: Accepted

Solution code:
n=int(input())
a=[int(x)-1 for x in input().split()]

b=[0]*n
for i in range(n):
    b[a[i]]=str(i+1)
print(" ".join(b))

Submission status: Accepted

Solution code:

def s0():return input()
def s1():return input().split()
def s2(n):return [input() for x in range(n)]
def s3(n):return [input().split() for _ in range(n)]
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]
def t3(n):return [tuple(int(x) for x in input().split()) for _ in range(n)]
def p0(b,yes="Yes",no="No"): print(yes) if b else print(no)
# from collections import Counter,deque,defaultdict
# import itertools
# import math
# import networkx
# from bisect import bisect_left,bisect_right
n=n0()
a=n1()

ans=[0]*(n+1)
for i,s in enumerate(a,1):
    ans[s]=i
print(*ans[1:])

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)

Submission status: Accepted

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

Submission status: Accepted

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

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

lst = []
for k, v in sorted(dct.items(), key=lambda x: x[1]):
    lst.append(str(k))

print(' '.join(lst))

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = "".join([str(a[0]) + " " for a in A])
print(ans[: -1])

Submission status: Accepted

Solution code:
stdin = open(0).read().rstrip().split('\n')
N = int(stdin[0])
A = list(map(int,stdin[1].split()))
ans =[0]*N
for i in range(N):
     ans[A[i]-1] = i+1
print(' '.join(map(str,ans)))

Submission status: Accepted

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

result = [None] * N

for i in range(N):
    result[A_i[i]-1] = i+1

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

Submission status: Accepted

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

for i in range(N):
  num = A[i]
  A_re.append([num, i+1])
  
A_re.sort()

Ans = []
for j in range(N):
  ans = A_re[j][1]
  Ans.append(str(ans))
  
Ans = ' '.join(Ans)
print(Ans)

Submission status: Accepted

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


print(ans)
#

Submission status: Accepted

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

l = [[] for i in range(n)]

for i in range(n):
    l[i] = [A[i], i+1]

l.sort()

ans = [0 for i in range(n)]
for i in range(n):
    ans[i] = l[i][1]

print(*ans)

Submission status: Accepted

Solution code:
N = int(input())
D = input().split()
D = sorted([[int(D[i]),i+1] for i in range(N)])
for i in range(N):
  print(D[i][1],end = " ")

Submission status: Accepted

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

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)

Submission status: Accepted

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

Submission status: Accepted

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

for i,j in enumerate(A):
    ans[j-1] = i+1    
print(' '.join([str(n) for n in ans]))

Submission status: Accepted

Solution code:
import sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

N = ri()
A = rl()

I = []
for i, a in enumerate(A):
	I.append((a, i))
I.sort()

print(*[i+1 for a, i in I])

Submission status: Accepted

Solution code:
N = int(input())

A = tuple(map(int, input().split(' ')))
A = [(a, index) for index, a in enumerate(A, start=1)]

print(' '.join([str(index) for _, index in sorted(A)]))

Submission status: Accepted

Solution code:
input()
print(*[i for a, i in sorted([(a, i) for i, a in enumerate(map(int, input().split()), 1)])])

Submission status: Accepted

Solution code:
input()
A = []
for i, a in enumerate(map(int, input().split()), 1):
    A.append((a, i))
print(*[i for a, i in sorted(A)])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
   
A = [0] + A
a = [0] * (N+1)

for i in range(1, N+1):
    a[A[i]] = str(i)
    
    #print(a)
    
print(" ".join(a[1:]))

Submission status: Accepted

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

As.sort()

anss = [i+1 for A, i in As]

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
ans = ["0"]*(N+1)

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

print(" ".join(ans[1:N+1]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# For taking integer inputs.
def inp():
    return(int(input()))


# For taking List inputs.
def inlist():
    return(list(map(int, input().split())))


# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings are Immutable.
def instr():
    s = input()
    return(list(s[:len(s)]))


# For taking space seperated integer variable inputs.
def invr():
    return(map(int, input().split()))


n = inp()
A = inlist()
pos = [0]*(n+1)

for i in range(n):
    pos[A[i]] = i+1
A = sorted(A)
res = []
for i in A:
    res.append(pos[i])
print(*res)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
li = []
for i, a in enumerate(A):
  li += [[a,i]]
  
li.sort()

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

Submission status: Accepted

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

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

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()))
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()))
T = list(sorted([(i+1,a) for i,a in enumerate(A)],key=lambda x: x[1]))
ans = [str(t[0]) for t in T] 
print(' '.join(ans))

Submission status: Accepted

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

ans = []

for j in range(n):
    ans.append(d.get(j+1))

print(*ans)

Submission status: Accepted

Solution code:

def main():
    k = int(input())
    t = list(map(int, input().split()))
    ans = {i: t[i-1] for i in range(1, k+1)}
    ans_sort = sorted(ans.items(), key=lambda x:x[1])
    for v in ans_sort:
        print(v[0], end=' ')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

n,  *lst = map(int, sys.stdin.read().split())
lst = [[i, idx] for idx, i in enumerate(lst, 1)]
lst.sort(key=lambda x: x[0])
lst = [str(i[1]) for i in lst]
print(' '.join(lst))

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
d = {v: str(k + 1) for k, v in enumerate(A)}
print(' '.join([v for _, v in sorted(d.items())]))

Submission status: Accepted

Solution code:
n = int(input())
a = [ [i+1, int(x)] for i,x in enumerate(input().split())]
a = sorted(a, key=lambda x: x[1])
for i in range(n):
    print(a[i][0], end=' ')

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] = str(i+1)

print(' '.join(Ans))

Submission status: Accepted

Solution code:
def resolve():
    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)


resolve()

Submission status: Accepted

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

ans = [None] * N
for i,v in enumerate(As):
  ans[v-1] = str(i+1)

print(" ".join(ans))

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
  
for x in ans:
  print(x, end=" ")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
Ad = {}
ans = [0]*N
i=0
for i in range(len(A)):
  Ad[i] = A[i]

i=0
for k, v in sorted(Ad.items(), key=lambda x: x[1]):
  ans[i] = k+1
  i+=1

print(*ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
a=[ii+1 for ii in range(n)]
b=[0]*n
b[:]=map(int,input().split())
import numpy as np
l=np.argsort(b)
"""
print(a)
print(b)
print(l)
"""
print(" ".join([str(a[l[ii]]) for ii in range(n)]))

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())
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())
As=list(map(int, input().split()))
man = [""] * N
for i in range(N):
  man[As[i]-1] = str(i+1)
result = ' '.join(man)
print(result)

Submission status: Accepted

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

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]=str(i+1)

print(" ".join(l))

Submission status: Accepted

Solution code:
import  numpy as np

n=int(input())
a = list(map(int,input().split()))
a = np.array(a)
b = np.argsort(a)
c = b+1
print(*c)

Submission status: Accepted

Solution code:
N = int(input())
A = [int(_) for _ in input().split()]
A_id = [[a, i+1] for i, a in enumerate(A)]
A_id.sort()
ans = [a[1] for a in A_id]
print(*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] = str(i+1)

ans = ' '.join(B)
print(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
else:
  B.pop(0)
  B = [str(b) for b in B]


B = " ".join(B)
print(B)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

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

order = []
for i in range(n):
    order.append([i, a[i]])

order = sorted(order, key=lambda a: a[1])

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

Submission status: Accepted

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

Submission status: Accepted

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

A = np.array(A)

x = np.argsort(A) + 1
x = list(x)
x = list(map(str,x))

print(' '.join(x))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
d = {str(i+1):a[i] for i in range(n)}
d = sorted(d.items(),key=lambda x:x[1])
ans = list(c[0] for c in d)
print(" ".join(ans))

Submission status: Accepted

Solution code:
import itertools
import math
import fractions
import functools
n = int(input())
a = list(map(int, input().split()))
index = []
for i in range(n):
    index.append([a[i],i+1])
index.sort(key=lambda x: x[0])

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

Submission status: Accepted

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

result = [0] * n

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

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] = str(i + 1)
print(' '.join(ans))

Submission status: Accepted

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

# check
numbers = sorted(
    [{"number": ind + 1, "A": a} for ind, a in enumerate(A)],
    key=lambda x: x["A"]
)

# output
op = ""
for n in numbers:
    op += str(n["number"])
    op += " "
print(op[:-1])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
from copy import deepcopy

N = int(input())
A = []
A.append(list(map(int, input().split())))
a = deepcopy(A[0])
a.sort()
A.append(a)
A_t = np.array(A).T.tolist()
A_t.sort()

out = []
for i in range(N):
    out.append(str(A_t[i][1]))
print(" ".join(out))

Submission status: Accepted

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

for i in range(N):
    tmp = A[i]
    ans[tmp-1] = i

for j in range(N):
    ans[j] += 1

print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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


for i in range(N):
    if i == N-1:
        print(student_dic[i])
    else:
        print(student_dic[i], 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([str(item) for item in ans]))

Submission status: Accepted

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

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


tmp = sorted(student_dic.items())
for i in range(N):
    if i == N-1:
        print(tmp[i][1])
    else:
        print(tmp[i][1], end=" ")