n = gets.split.map {|e| e.to_i }.first
bs = gets.split.map {|e| e.to_i }.sort.reverse

def f(index, bs)
  bs.each.with_index { |e, i|
    if e <= index
      return [e, i]
    end
  }
  return nil
end

xs = []
n.times { |i|
  x, pos = f(i + 1, bs)
  if x
    bs.delete_at(pos)
    xs.push(x)
  else
    puts -1
    exit
  end
}
puts xs
