#include <bits/stdc++.h>
using namespace std;
const int NMAX = 50005;
int restr[NMAX];
vector<int> adj[NMAX];
queue<int> q;
int main()
{
ifstream cin("sortaret.in");
ofstream cout("sortaret.out");
int n, m, a, b;
cin>>n>>m;
for(int i=0; i<m; i++)
{
cin>>a>>b;
restr[b]++;
adj[a].push_back(b);
}
for(int i=1; i<=n; i++)
if(restr[i] == 0)
q.push(i);
while(q.empty() == false)
{
int top = q.front(); q.pop();
cout<<top<<" ";
for(auto x : adj[top])
{
restr[x]--;
if(restr[x] == 0)
q.push(x);
}
}
return 0;
}