m = gets.to_i
es = Array.new(m) { [] }
cs = Array.new m, 0
gets.to_i.times do
  x, y = gets.split.map {|s| s.to_i - 1 }
  next if x == 1 || y == 1
  es[x] << y
  cs[y] += 1
end
todo = m.times.select {|i| cs[i].zero? }
rs = []
until todo.empty?
  x = todo.pop
  rs << x unless x == 1
  es[x].each {|y|
    cs[y] -= 1
    todo << y if cs[y].zero?
  }
end
rs << 1
rs.each {|x| p x + 1 }