#include <bits/stdc++.h>
#define NMAX 50000
#define MMAX 100000
#define ALB 0
#define NEGRU 2
#define GRI 1
using namespace std;
vector<int> l, G[NMAX + 1];
int colour[NMAX + 1];
void DFS( int x ) {
colour[x] = GRI;
for( auto it : G[x] )
if( colour[it] == ALB )
DFS(it);
colour[x] = NEGRU;
l.push_back(x);
}
int main() {
ifstream fin("sortaret.in");
ofstream fout("sortaret.out");
int n, m, i, x, y;
fin>>n>>m;
for( i = 1; i <= m; i ++ ) {
fin>>x>>y;
G[x].push_back(y);
}
for( i = 1; i <= n; i ++ )
if( colour[i] == ALB )
DFS(i);
reverse(l.begin(),l.end());
for( auto it : l )
fout<<it<<" ";
return 0;
}