/*
* tuopu排序,但是要求按序号排出,按普通的拓扑排序不行,所以就只有从前往后
* 扫描,每一趟只排一条边
*/
#include <iostream>
#include <string.h>
#include <vector>
using namespace std;
#define _max 505
int stu[_max];
int indegree[_max];
bool visited[_max];
int n, m;
int main() {
int i, j;
while (cin >> n >> m) {
memset(indegree, 0, sizeof (indegree));
vector<int>v[_max];
for (i = 1; i <= m; i++) {
int a, b;
cin >> a >> b;
indegree[b]++;
v[a].push_back(b);
}
memset(visited, 0, sizeof (visited));
int num = 0;
for (i = 1; i <= n; i++) {
for (j = 1; j <= n; j++) {
if (!visited[j] && indegree[j] == 0) {
visited[j] = 1;
int k;
stu[++num] = j;
for (k = 0; k < v[j].size(); k++)
indegree[v[j][k]]--;
break;//排了一条边之后就要跳出,进行下一轮排序
}
}
}
for (i = 1; i < num; i++) {
cout << stu[i] << " ";
}
cout << stu[num] << endl;
}
return 0;
}