#include <fstream>
#include <queue>
#include <vector>
using namespace std;
ifstream in ("sortaret.in");
ofstream out ("sortaret.out");
const int N = 50001;
int n;
int m;
vector<int> s[N];
vector<int> a[N];
bool v[N];
vector<int> sortat;
int nrp[N];
queue<int> q;
void citire() {
in >> n >> m;
for (int i = 0; i < m; i++) {
int x;
int y;
in >> x >> y;
a[x].push_back(y);
a[y].push_back(x);
s[x].push_back(y);
nrp[y]++;
}
return;
}
void bfs() {
for (int i = 1; i <= n; i++) {
if (nrp[i] == 0) {
q.push(i);
}
}
while (!q.empty()) {
int x = q.front();
q.pop();
out << x << " ";
for (auto y : s[x]) {
nrp[y]--;
if (nrp[y] == 0) {
q.push(y);
}
}
}
return;
}
void dfs(int x) {
v[x] = true;
for (auto y : a[x]) {
if (!v[y]) {
dfs(y);
}
}
sortat.push_back(x);
}
int main() {
citire();
dfs(1);
for (int i = sortat.size() - 1; i >= 0; i--) {
out << sortat[i] << " ";
}
return 0;
}