#include <bits/stdc++.h>
int n, m;
std::vector<int> g[1 + (4 * 100 * 1000)];
std::vector<int> ig[1 + (4 * 100 * 1000)];
int main(void) {
  scanf("%d %d", &n, &m);
  for (int i = m; i--;) {
    int v, u;
    scanf("%d %d", &v, &u);
    g[v].push_back(u);
    ig[u].push_back(v);
  }
  std::priority_queue<int> pq;
  int remaining_out_degree[1 + (4 * 100 * 1000)];
  int label[1 + (4 * 100 * 1000)];
  int current_label = n;
  for (int i = 1; i <= n; i++) {
    remaining_out_degree[i] = g[i].size();
    if (remaining_out_degree[i] == 0) {
      pq.push(i);
    }
  }
  while (!pq.empty()) {
    int v = pq.top();
    pq.pop();
    label[v] = current_label--;
    for (auto u : ig[v]) {
      if (--remaining_out_degree[u] == 0) {
        pq.push(u);
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    printf("%d%c", label[i], (i == n) ? '\n' : ' ');
  }
  return 0;
}
