require 'tsort'

n = gets.to_i
m = gets.to_i

g = {}
(1..n).each{|i| g[i] = []}

m.times do
	i, j = gets.split.map &:to_i	
	g[j] << i
end

class << g
	include TSort
	alias :tsort_each_node :each_key
	def tsort_each_child(i, &block)
		self[i].each(&block)
	end
end

puts g.tsort * ' '