#include <bits/stdc++.h>
using namespace std;
long long n, m;
vector<long long> graph[100010], indeg(100010), order(100010);
void topoSort() {
  for (long long i = 1; i <= n; ++i) {
    for (auto x : graph[i]) {
      ++indeg[x];
    }
  }
  priority_queue<long long> q;
  for (long long i = 1; i <= n; i++) {
    if (!indeg[i]) q.push(i);
  }
  long long cnt = n;
  while (!q.empty()) {
    long long frt = q.top();
    order[frt] = cnt--;
    q.pop();
    for (long long x : graph[frt]) {
      --indeg[x];
      if (!indeg[x]) q.push(x);
    }
  }
}
void testCase() {
  cin >> n >> m;
  for (long long i = 0; i < m; i++) {
    long long u, v;
    cin >> u >> v;
    graph[v].push_back(u);
  }
  topoSort();
  for (long long i = 1; i <= n; ++i) {
    cout << order[i] << ' ';
  }
  cout << endl;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) testCase();
  return 0;
}
