//https://www.nowcoder.com/practice/88f7e156ca7d43a1a535f619cd3f495c
#include <bits/stdc++.h>
using namespace std;
const int N=2e5+10,M=N;
int n,m;
int head[N],Next[M],to[M],cnt;
int indegree[N],ans[N];
int h,t;
int q[N];
void build(){
cnt=1;
h=t=0;
memset(head,0,sizeof head);
memset(indegree,0,sizeof indegree);
}
void addEdge(int u,int v){
Next[cnt]=head[u];
to[cnt]=v;
head[u]=cnt++;
}
bool topoSort(){
for(int i=1;i<=n;i++) if(indegree[i]==0) q[t++]=i;
int fill=0;
while(h<t){
int u=q[h++];
ans[++fill]=u;
for(int ei=head[u],v;ei;ei=Next[ei]){
v=to[ei];
if(--indegree[v]==0) q[t++]=v;
}
}
return fill==n;
}
int main(){
scanf("%d%d",&n,&m);
build();
for(int i=1,u,v;i<=m;i++){
scanf("%d%d",&u,&v);
indegree[v]++;
addEdge(u,v);
}
if(!topoSort()) puts("-1");
else{
printf("%d",ans[1]);
for(int i=2;i<=n;i++) printf(" %d",ans[i]);
}
return 0;
}