#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
ifstream in("sortaret.in");
ofstream out("sortaret.out");
const int N=50001;
vector<int> a[N];
int n,m,nrp[N],u=-1,p=0,q[N];
bool viz[N];
void citire()
{
int x,y,i;
in>>n>>m;
for(i=1; i<=m; i++)
{
in>>x>>y;
a[x].push_back(y);
nrp[y]++;
}
in.close();
}
void bfs()
{
int x,y;
while(p<=u)
{
x=q[p++];
out<<x<<" ";
for(size_t i=0; i<a[x].size(); i++)
{
y=a[x][i];
nrp[y]--;
if(nrp[y]==0)
{
q[++u]=y;
}
}
}
}
int main()
{
int i;
citire();
for(i=1; i<=n; i++)
if(nrp[i]==0)
q[++u]=i;
bfs();
return 0;
}