#include <iostream>
#include <algorithm>
#include <cstring>
#include <queue>
using namespace std;
const int N = 1e5 + 10;
int e[N],ne[N],h[N],idx;
int d[N];
int n,m,top[N],cnt = 1;
void add(int a,int b)
{
e[idx] = b;
ne[idx] = h[a];
h[a] = idx ++;
}
bool topsort()
{
queue<int> q;
int t;
for(int i = 1;i <= n; i++)
if(d[i] == 0) q.push(i);
while(q.size())
{
t = q.front();
q.pop();
top[cnt] = t;
cnt ++;
for(int i = h[t];i != -1; i = ne[i])
{
int j = e[i];
d[j] --;
if(d[j] == 0) q.push(j);
}
}
if(cnt < n) return 0;
else return 1;
}
int main()
{
int a,b;
cin >> n >> m;
memset(h,-1,sizeof h);
while(m--)
{
cin >> a >> b;
add(a,b);
d[b] ++;
}
if(topsort() == 0) cout << "-1";
else {
for(int i = 1;i <= n; ++i){
cout << top[i] <<" ";
}
}
return 0;
}