#include <iostream>
#include <fstream>
#include <vector>
#include <stack>
#include <bitset>
#include <queue>
using namespace std;
ifstream fin("sortaret.in");
ofstream fout("sortaret.out");
const int NMAX = 5e5 + 1;
vector<int> g[NMAX];
bitset<NMAX> viz;
bitset<NMAX> dad;
stack<int> st;
int main()
{
int n, m;
dad.set();
fin >> n >> m;
int x, y;
for (int i = 0; i < m; ++i)
{
fin >> x >> y;
g[x].push_back(y);
dad[y] = 0;
}
queue<int> q;
for (int i = 1; i <= n; ++i)
if (dad[i] == 1)
q.push(i);
while (!q.empty())
{
int crt = q.front();
q.pop();
if (viz[crt])
continue;
fout << crt << " ";
viz[crt] = 1;
for (int y : g[crt])
if (viz[y] == 0)
q.push(y);
}
return 0;
}