#include <bits/stdc++.h>
using namespace std;
ifstream fin("sortaret.in");
ofstream fout("sortaret.out");
int n,m,i,x,y,sol[50001],v[50001],g[50001],k;
vector<int> L[50001];
void sortare_topologica(int nod)
{
v[nod] = 1;
for (int i=0; i<L[nod].size(); i++)
{
int vecin = L[nod][i];
if (v[vecin] == 0)
sortare_topologica(vecin);
}
sol[++k] = nod;
}
int main()
{
fin >> n >> m;
for (i=1; i<=m; i++)
{
fin >> x >> y;
L[x].push_back(y);
g[y]++;
}
for (i=1; i<=n; i++)
if (g[i] == 0)
sortare_topologica(i);
for (i=k; i>=1; i--)
fout << sol[i] << " ";
return 0;
}