#include <bits/stdc++.h>
#define MAXN 100000
using namespace std;
ifstream fin("sortaret.in");
ofstream fout("sortaret.out");
vector <int> graf[MAXN + 1];
int intr[MAXN + 1];
int main()
{
int n, m, i, x, y, cur;
fin >> n >> m;
for(i = 1; i <= m; i++){
fin >> x >> y;
graf[x].push_back(y);
intr[y] ++;
}
queue <int> q;
for(i = 1; i <= n; i++){
if(!intr[i]){
q.push(i);
}
}
while(!q.empty()){
cur = q.front();
q.pop();
fout << cur << " ";
for(i = 0; i < graf[cur].size(); i++){
intr[graf[cur][i]]--;
if(intr[graf[cur][i]] == 0){
q.push(graf[cur][i]);
}
}
}
fout << "\n";
return 0;
}