public static void main(String[] args) {
    Scanner scn = new Scanner(System.in);
    int v = scn.nextInt();
    int e = scn.nextInt();
    while (v != 0 || e != 0) {
      // Initialize no incoming set
      TreeSet<Integer> noIncoming = new TreeSet<Integer>();
      for (int i = 1; i <= v; i++) {
        noIncoming.add(i);
      }

      // Read edges
      HashMap<Integer, Set<Integer>> in = new HashMap<Integer, Set<Integer>>();
      HashMap<Integer, Set<Integer>> out = new HashMap<Integer, Set<Integer>>();
      for (int i = 0; i < e; i++) {
        int from = scn.nextInt();
        int to = scn.nextInt();

        put(out, from, to);
        put(in, to, from);

        noIncoming.remove(to);
      }

      // Main algorithm
      LinkedList<Integer> ordering = new LinkedList<Integer>();
      while (!noIncoming.isEmpty()) {
        int from = noIncoming.pollFirst();
        ordering.add(from);

        // remove edges
        Set<Integer> outgoing = out.remove(from);
        if (outgoing != null) {
          for (int to : outgoing) {
            Set<Integer> fromSet = in.get(to);
            fromSet.remove(from);
            if (fromSet.isEmpty()) {
              noIncoming.add(to);
              in.remove(to);
            }
          }
        }
      }

      output(ordering);

      // new iteration
      v = scn.nextInt();
      e = scn.nextInt();
    }
  }