#include <bits/stdc++.h>
using namespace std;
vector<vector<long long>> g, gg;
vector<long long> deg;
int main() {
  long long n, m;
  cin >> n >> m;
  deg.resize(n);
  gg.resize(n);
  g.resize(n);
  for (long long i = 0; i < m; i++) {
    long long u, v;
    cin >> u >> v;
    u--, v--;
    g[u].push_back(v);
    gg[v].push_back(u);
    deg[u]++;
  }
  set<long long> st;
  vector<long long> ans(n);
  for (long long i = 0; i < n; i++)
    if (deg[i] == 0) st.insert(i);
  for (long long i = n; i > 0; i--) {
    long long v = *st.rbegin();
    st.erase(v);
    ans[v] = i;
    for (long long j = 0; j < gg[v].size(); j++) {
      deg[gg[v][j]]--;
      if (deg[gg[v][j]] == 0) st.insert(gg[v][j]);
    }
  }
  for (long long i = 0; i < n; i++) cout << ans[i] << ' ';
  return 0;
}
