#include <bits/stdc++.h>
using namespace std;
ifstream fin("sortaret.in");
ofstream fout("sortaret.out");
int n,m,grad[50001];
vector<int> adj[50001];
vector<int> ans;
int main()
{
fin >> n >> m;
for(int i = 1; i <= m; i++)
{
int st, dr;
fin >> st >> dr;
adj[st].push_back(dr);
grad[dr]++;
}
queue<int> q;
for(int i = 1; i <= n; i++)
if(grad[i] == 0)
q.push(i);
while(!q.empty())
{
int curr = q.front();
q.pop();
ans.push_back(curr);
for(int i : adj[curr])
{
grad[i]--;
if(grad[i] == 0)
q.push(i);
}
}
for(int i = 0; i < ans.size(); i++)
fout << ans[i] << ' ';
return 0;
}