#include <fstream>
#include <vector>
#include <algorithm>
using namespace std;
ifstream f("sortaret.in");
ofstream g("sortaret.out");
const int NMAX = 5e4 + 1;
int N, M;
vector < int > G[NMAX];
bool Sel[NMAX];
vector < int > V;
static inline void Read ()
{
f.tie(nullptr);
f >> N >> M;
for(int i = 1; i <= M; ++i)
{
int X = 0, Y = 0;
f >> X >> Y;
G[X].push_back(Y);
}
return;
}
static inline void DFS (int Node)
{
Sel[Node] = 1;
for(auto it : G[Node])
if(!Sel[it])
DFS(it);
V.push_back(Node);
return;
}
static inline void TopoSort ()
{
for(int i = 1; i <= N; ++i)
if(!Sel[i])
DFS(i);
reverse(V.begin(), V.end());
return;
}
static inline void Write ()
{
for(int i = 0; i < N; ++i)
{
g << V[i];
if(i != (N - 1))
g << ' ';
}
g << '\n';
return;
}
int main()
{
Read();
TopoSort();
Write();
return 0;
}