#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6;
int head[maxn];
int next1[maxn];
int ver[maxn];
int tot = 0;
int deg[maxn];
void add(int u,int v) {
ver[++tot] = v;
next1[tot] = head[u];
head[u] = tot;
//预处理每个点的入度
deg[v]++;
}
vector<int> ans;
void topsort() {
queue<int> que;
for (int i=1; i<=n; i++) //将入度为0的点加入到队列中,
if (!deg[i]) que.push(i);
while (!que.empty()) {
//队列中的点一定是入度=0的点,那么先加入到top序列中,
int cur = que.top();
que.pop();
ans.push_back(cur);
for (int i=head[cur]; i ; i=next1[i]) {
deg[i]--;
if (!deg[i]) que.push(i);
}
}
}
int main() {
freopen("a.txt","r",stdin);
int n,m;
cin >> n >> m;
for (int i=1; i<=m; i++) {
int u,v;
cin >> u >> v;
add(u,v);
}
topsort();
for (int i=0; i<ans.size(); i++) cout << ans[i] << " ";
return 0;
}