#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
ifstream fin("sortaret.in");
ofstream fout("sortaret.out");
vector<int> g[50005];
bool vizitat[50005];
int solutie[50005], k;
void dfs(int u) {
vizitat[u] = true;
for (int v : g[u]) {
if (!vizitat[v]) {
dfs(v);
}
}
solutie[k++] = u;
}
int main() {
int n, m, x, y;
fin >> n >> m;
while (m--) {
fin >> x >> y;
g[x].push_back(y);
}
for (int i = 1; i <= n; i++) {
if (!vizitat[i]) {
dfs(i);
}
}
for (int i = k - 1; i >= 0; i--) {
fout << solutie[i] << " ";
return 0;
}