N = gets.to_i A = gets.split(" ").map.with_index{|s, i| [s.to_i, i+1]} a = A[1, N-1].sort_by{|x, i| -x}.map{|x, i| i.to_s} puts (["1"] + a + ["1"]).join(" ")