#include <fstream>
#include <iostream>
#include <vector>
#include <bitset>
#include <stack>
using namespace std;
ifstream fin("sortaret.in");
ofstream fout("sortaret.out");
#define NMAX 50005
vector<int> graph[NMAX];
bitset<NMAX> viz;
stack<int> s;
void dfs(int x)
{
viz[x] = 1;
for (auto i : graph[x])
{
if (viz[i] == 0)
{
dfs(i);
}
}
s.push(x);
}
int main()
{
int n, m;
fin >> n >> m;
for (int i = 0; i < m; i++)
{
int a, b;
fin >> a >> b;
graph[a].push_back(b);
}
for (int i = 1; i <= n; i++)
{
if (!viz[i])
{
dfs(i);
}
}
while (!s.empty())
{
fout << s.top() << " ";
s.pop();
}
return 0;
}