#include <bits/stdc++.h>
using namespace std;
int Viz[50005], postordine[50005], n, m, x, y, nr;
vector <int> V[50005];
void dfs (int x)
{
Viz[x]=1;
for (int i=0; i<(int)V[x].size(); i++)
{
int next = V[x][i];
if (!Viz[next])
dfs(next);
}
postordine[++nr]=x;
}
void fast ()
{
ios_base::sync_with_stdio(false);
cin.tie();
}
int main()
{
fast();
freopen("sortaret.in","r", stdin);
freopen("sortaret.out","w", stdout);
cin >> n >> m;
for (int i=1; i<=m; i++)
{
cin >> x >> y;
V[x].push_back(y);
}
for (int i=1; i<=n; i++)
if (!Viz[i])
dfs(i);
for (int i=n; i>0; i--)
cout << postordine[i] << " ";
cout << endl;
return 0;
}