object Main {
  def main(args: Array[String]): Unit = {
    import java.util.Scanner
    val in = new Scanner(System.in)
    val n = in.nextInt
    val a = List.fill(n)(in.nextInt)
    val cameChilds = a.map(x => a(x - 1) - 1)
    val zipWithChilds = a zip cameChilds
    val answer = zipWithChilds.sortBy(_._2)
    (0 until n).foreach { x => print(answer(x)._1); print(' ') }
  }
}