#include<bits/stdc++.h>
using namespace std;
ifstream fin ("sortaret.in");
ofstream fout ("sortaret.out");
const int nmax=1e5+5;
vector <int> g[nmax];
int n, m, grad[nmax];
void toposort ()
{
queue <int> q;
vector <int> tsort;
for (int i=1; i<=n; i++)
{
if (grad[i]==0)
q.push(i);
}
while (!q.empty())
{
int node=q.front();
q.pop();
tsort.push_back(node);
for (auto it:g[node])
{
grad[it]--;
if (grad[it]==0)
q.push(it);
}
}
for (auto it:tsort)
fout << it << " ";
}
int main()
{
fin >> n >> m;
for (int i=1; i<=m; i++)
{
int x, y;
fin >> x >> y;
g[x].push_back(y);
grad[y]++;
}
toposort();
}