m = gets.to_i
n = gets.to_i
list = {}
n.times do
  x, y = gets.chomp.split.map(&:to_i)
  list[x] = (list[x].nil? ? [y] : list[x].push(y))
end
ans = (1..m).to_a
list.each do |witness, suspect|
  5.times do
    suspect.each do |s|
      si = ans.index(s)
      wi = ans.index(witness)
      if si < wi
        ans.insert(si, ans[wi])
        ans.delete_at(wi+1)
      end
    end
  end
end

puts ans