#include<iostream>
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<cmath>
#include<string>
#include<map>
#include<set>
#include<algorithm>
#include<vector>
#include<stack>
#include<sstream>
#define ll long long
using namespace std;
/**********************************************************/
const int M_NUM_MAX = 100+10;
const int M_INT_MAX = 0x7fffffff;
const double M_DBL_MAX = 1.7976931348623158e+308;
const double M_DBL_MIN = 2.2250738585072014e-308;
bool theMap[M_NUM_MAX][M_NUM_MAX];
int n,m;
int vis[M_NUM_MAX];
stack<int> sk;
/**********************************************************/
int min_2 (int x,int y) {return x<y?x:y;}
int max_2 (int x,int y) {return x>y?x:y;}
bool dfs (int i)
{
vis[i]=-1;
for (int j=1;j<=n;j++){
if (theMap[i][j]){
if (vis[j]==-1) return false;//the i-th node have loop
else if (vis[j]==0)
if( !dfs(j) )//if the i-th's son node have loop
return false;
}
}
vis[i]=1;
sk.push (i);
return true;
}
bool TopoSort ()
{
for (int i=1;i<=n;i++)
if (!vis[i])//not be visited
if( !dfs(i) )//dfs false
return false;
return true;//have toposort
}
/**********************************************************/
int main()
{
//freopen ("in.txt","r",stdin);
while (scanf ("%d %d",&n,&m)&&(n||m))
{
memset (theMap,0,sizeof (theMap));
memset (vis,0,sizeof (vis));
int a,b;
for (int i=0;i<m;i++){
scanf ("%d %d",&a,&b);
theMap[a][b]=true;
}
if( TopoSort () ){
while ( !sk.empty ())
{
printf ("%d",sk.top ());
sk.pop ();
if (sk.size ()>0)
printf (" ");
else printf ("\n");
}
}
}
return 0;
}