#include<iostream>
#include<cstdio>
#include<set>
#include<string>
#include<string.h>
#include<cstring>
#include<vector>
#include<map>
#include<queue>
#include<stack>
#include<cctype>
#include<algorithm>
#include<sstream>
#include<utility>
#include<cmath>
#include<functional>
#define mt(a) memset(a,0,sizeof (a))
#define fl(a,b,c) fill(a,b,c)
#define SWAP(a,b,t) (t=a,a=b,b=t)
#define inf 1000000000+7
using namespace std;
typedef long long ll;
queue<int>q;
int vis[120];
int in[120];
int g[120][120];
int main()
{
int n, m;
while (cin >> n >> m)
{
mt(vis);
mt(g);
mt(in);
while (!q.empty())q.pop();
if (!n&&!m)break;
for (int i = 0; i < m; i++)
{
int x, y;
cin >> x >> y;
g[x][y] = 1;
in[y]++;
}
for (int i = 1; i <= n;i++)
if (!in[i])q.push(i);
while (!q.empty())
{
int y = q.front(); q.pop();
for (int i = 1; i <= n;i++)
if (g[y][i])
{
in[i]--;
if (!in[i])q.push(i);
}
printf("%d", y);
if (!q.empty())printf(" ");
}
printf("\n");
}
return 0;
}