#! ruby # yukicoder My Practice # author: Leonardone @ NEETSDKASU def gs(); gets.chomp; end def gi(); gets.to_i; end def gss(); gets.chomp.split; end def gis(); gss.map(&:to_i); end n = gi t = gis d = gis td = (1..n).zip(t,d).sort_by{|(i1,t1,d1)| -t1 } puts td.map{|i1,t1,d1| i1} * " "