#include<iostream>
#include<queue>
#include<vector>
#include<string.h>
#include<functional>
using namespace std;
vector<int> matrix[10001];//邻接矩阵
int M, N, ans[10001];
int indegree[10001];//记录入度
int main(){
while(cin >> N >> M){
memset(indegree, 0, sizeof(indegree));
for(int i = 1; i <= M; i++){
int x, y;
cin >> x >> y;
matrix[x].push_back(y);
indegree[y]++;
}
priority_queue<int, vector<int>, greater<int> > queue;
int count = 1;
memset(ans, 0, sizeof(ans));
for(int i = 1; i <= N; i++)
if(!indegree[i])
queue.push(i);
while(!queue.empty()){
int cur = queue.top();
queue.pop();
ans[count++] = cur;
for(unsigned int i = 0; i < matrix[cur].size(); i++)
if(--indegree[matrix[cur][i]] == 0)
queue.push(matrix[cur][i]);
}
for(int i = 1; i <= N; i++)
cout << ans[i] << (i != N ? " " : "\n");
}
return 0;
}
//presented by 大吉大利,今晚AC