#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> adj;
vector<vector<int>> radj;
int main() {
  int n, m;
  cin >> n >> m;
  int deg[n + 1];
  int ans[n + 1];
  for (int i = 0; i <= n; i++) {
    deg[i] = 0;
  }
  adj.resize(n + 1);
  radj.resize(n + 1);
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    radj[v].push_back(u);
    deg[u]++;
  }
  set<int> s;
  for (int i = 1; i <= n; i++) {
    if (deg[i] == 0) {
      s.insert(i);
    }
  }
  int val = n;
  while (!s.empty()) {
    auto it = s.end();
    it--;
    int node = (*it);
    ans[node] = val;
    val--;
    s.erase(node);
    for (auto u : radj[node]) {
      deg[u]--;
      if (deg[u] == 0) {
        s.insert(u);
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
  return 0;
}
