#include <fstream>
#include <vector>
#include <queue>
using namespace std;
ifstream fin("sortaret.in");
ofstream fout("sortaret.out");
const int NMAX = 50002;
int n,m;
vector<int> adj[NMAX];
int frec[NMAX];
void topSort() {
queue<int> q;
for (int i=1;i<=n;i++) {
if (frec[i] == 0) {
q.push(i);
}
}
while (!q.empty()) {
int newNode = q.front();
q.pop();
fout<<newNode<<" ";
for (auto v : adj[newNode]) {
frec[v]--;
if (frec[v] == 0) {
q.push(v);
}
}
}
}
int main()
{
fin>>n>>m;
int a,b;
for (int i=0;i<m;i++) {
fin>>a>>b;
adj[a].push_back(b);
frec[b]++;
}
topSort();
return 0;
}