#include <bits/stdc++.h>
using namespace std;

void fastio() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
}

int n, m;
vector<vector<int>> adjList;
vector<bool> vis;
vector<int> topo;

void dfs(int node) {
    vis[node] = true;
    for (auto& v : adjList[node])
        if (!vis[v])
            dfs(v);
    topo.push_back(node);
}

void solve() {
    while (cin >> n >> m) {
        if (n == 0 && m == 0)
            return;

        adjList.assign(n + 1, vector<int>());
        vis.assign(n + 1, false);
        topo.clear();
        for (int i = 0; i < m; ++i) {
            int u, v;
            cin >> u >> v;
            adjList[u].push_back(v);
        }

        for (int i = 1; i <= n; ++i)
            if (!vis[i])
                dfs(i);

        reverse(topo.begin(), topo.end());
        for (auto& t : topo)
            cout << t << ' ';
        cout << '\n';
    }
}

int main() {
    fastio();
    solve();
    return 0;
}
