hdu1285
/**/
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cctype>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <stack>
#include <queue>
typedef long long LL;
using namespace std;
int n, m;
int mp[505][505], in[505];
void topo(){
priority_queue<int, vector<int>, greater<int> >q;
for (int i = 1; i <= n; i++){
if(!in[i]){
q.push(i);
}
}
int cnt = 1;
while(q.size()){
int u = q.top();
q.pop();
if(cnt == 1){
printf("%d", u);
cnt++;
}else{
printf(" %d", u);
}
for (int i = 1; i <= n; i++){
if(!mp[u][i]) continue;
in[i]--;
if(!in[i]) q.push(i);
}
}
printf("\n");
}
int main()
{
//freopen("in.txt", "r", stdin);
//freopen("out.txt", "w", stdout);
while(scanf("%d %d", &n, &m) == 2){
int x, y;
memset(mp, 0, sizeof(mp));
memset(in, 0, sizeof(in));
for (int i = 1; i <= m; i++){
scanf("%d %d", &x, &y);
if(mp[x][y]) continue;
mp[x][y] = 1;
in[y]++;
}
topo();
}
return 0;
}
/**/