#include <bits/stdc++.h>
using namespace std;
ifstream fin("sortaret.in");
ofstream fout("sortaret.out");
int n, m;
vector<int> v[100005];
bool visited[100005];
int st[100005];
int top;
void DFS(int node) {
if (!visited[node]) {
visited[node] = true;
for (auto urm : v[node]) {
if (!visited[urm]) {
DFS(urm);
}
}
}
st[++top] = node;
}
int main() {
ios_base::sync_with_stdio(false);
fin.tie(NULL);
fout.tie(NULL);
fin >> n >> m;
int a, b;
for (int i = 0; i < m; i++) {
fin >> a >> b;
v[a].push_back(b);
}
int ct = 0;
for (int i = 1; i <= n; i++) {
if (!visited[i]) {
DFS(i);
ct++;
}
}
for (int i = 1; i <= top; i++) {
fout << st[i] << " ";
}
return 0;
}