#include <bits/stdc++.h>
using namespace std;
int n, m;
int parents[50020];
vector<int> a[50020];
int main() {
int t1, t2;
cin >> n >> m;
for (int i = 0; i < m; i++) {
cin >> t1 >> t2;
a[t1].push_back(t2);
parents[t2]++;
}
queue<int> l, s;
for (int i = 1; i <= n; i++) {
if (!parents[i]) {
s.push(i);
}
}
while (!s.empty()) {
int k = s.front();
s.pop();
for (auto &it: a[k]) {
parents[it]--;
if (!parents[it]) s.push(it);
}
l.push(k);
}
for (int i = 0; i < n; i++) {
cout << l.front() << " ";
l.pop();
}
return 0;
}