#include <bits/stdc++.h>
using namespace std;
int N, M;
vector<int> node[32001];
int indeg[32001] = {};
void solve() {
priority_queue<int, vector<int>, greater<int>> pq;
for(int i=1; i<=N; i++) {
if(!indeg[i]) pq.push(i);
}
vector<int> answer;
while(!pq.empty()) {
int cur = pq.top();
pq.pop();
answer.push_back(cur);
for(const auto& next: node[cur]) {
indeg[next]--;
if(indeg[next] == 0) {
pq.push(next);
}
}
}
for(const auto& el: answer) {
cout << el << ' ';
}
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cin >> N >> M;
for(int i=0; i<M; i++){
int A, B;
cin >> A >> B;
node[A].push_back(B);
indeg[B]++;
}
solve();
}