a=$<.read.split.map &:to_f;puts (1..n=a[0]).sort_by{|i|a[n+i]/a[i]}*' '