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

Solution in Rust (1.15.1) (judge verdict: Accepted)

#![allow(dead_code)]
#![allow(unused_must_use)]

fn solve(src: &str) -> String {
    use std::fmt::Write;
    let mut buf = String::new();
    let mut sc = Scanner::from_str(&src);

    let n : usize = sc.read();
    let a : Vec<usize> = sc.vec(n);

    let mut a: Vec<_> = a.iter().enumerate().collect();
    a.sort_by(|&(_, a),&(_,b)| a.cmp(b));
    for &(i, _) in a.iter() {
        write!(&mut buf, "{} ", i+1);
    }

    buf
}

#[test]
fn test() {
    assert_eq!(solve(r"3
2 3 1"),r"3 1 2 ");
assert_eq!(solve(r"5
1 2 3 4 5"),r"1 2 3 4 5 ");
assert_eq!(solve(r"8
8 2 7 3 4 5 6 1"),r"8 2 4 5 6 7 3 1 ");
}

fn main() {
    let mut buf = String::new();
    use std::io::Read;
    std::io::stdin().read_to_string(&mut buf);
    use std::io::Write;
    std::io::stdout().write_all(solve(&buf).as_bytes());
}

struct Scanner<I>{
    src: I
}

impl<'a> Scanner<std::str::SplitWhitespace<'a>> {
    fn from_str(src: &'a str) -> Self {
        Scanner { src: src.split_whitespace() }
    }
}

impl<'a, I> Scanner<I> where I: std::iter::Iterator<Item = &'a str>{
    fn read<T: std::str::FromStr>(&mut self) -> T {
        self.src.next().unwrap().parse().ok().expect("Parse error")
    }
    fn vec<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).map(|_| self.read()).collect()
    }
    fn chars(&mut self) -> Vec<char> {
        self.src.next().unwrap().chars().collect()
    }
}