#include <iostream>
#include <fstream>
#include <vector>
#include <queue>
using namespace std;
ifstream fin("sortaret.in");
ofstream fout("sortaret.out");
int main()
{
int N, M;
fin >> N >> M;
vector<vector<int>> adj(N+1, vector<int>());
vector<int> inDegree(N+1, 0);
vector<int> solution;
queue<int> noIncomingEdge;
for(int i = 0; i < M; i++){
int a, b;
fin >> a >> b;
adj[a].push_back(b);
inDegree[b]++;
}
for(int i = 1; i <= N; i++){
if(inDegree[i] == 0){
noIncomingEdge.push(i);
}
}
while(!noIncomingEdge.empty()){
int node = noIncomingEdge.front();
noIncomingEdge.pop();
solution.push_back(node);
for(int i = 0; i < adj[node].size(); i++){
int newNode = adj[node][i];
inDegree[newNode]--;
M--;
if(inDegree[newNode] == 0){
noIncomingEdge.push(newNode);
}
}
}
if(M > 0){
fout << -1;
}
else{
for(auto e : solution){
fout << e << " ";
}
}
return 0;
}