#include <bits/stdc++.h>
using namespace std;
int out[200000];
vector<int> g[200000];
int ans[200000];
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int u, v;
    cin >> u >> v;
    out[u]++;
    g[v].push_back(u);
  }
  priority_queue<int> pq;
  for (int i = 1; i <= n; i++) {
    if (out[i] == 0) pq.push(i);
  }
  int lvl = n;
  while (!pq.empty()) {
    int x = pq.top();
    pq.pop();
    ans[x] = lvl--;
    for (auto v : g[x]) {
      out[v]--;
      if (out[v] == 0) pq.push(v);
    }
  }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}
