#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 44;
const int X[] = {1, 0, -1, 0, 1, -1, 1, -1};
const int Y[] = {0, 1, 0, -1, 1, 1, -1, -1};
const int mod = 998244353;
const int INF = INT_MAX;
priority_queue<int> s;
vector<int> g[N];
int d[N], ans[N];
int main() {
  int n, m;
  cin >> n >> m;
  int u, v;
  while (m--) {
    cin >> u >> v;
    u--, v--;
    g[v].push_back(u);
    d[u]++;
  }
  for (int i = 0; i < n; i++)
    if (!d[i]) s.push(i);
  int cnt = n;
  while (s.size()) {
    v = s.top();
    s.pop();
    ans[v] = cnt--;
    for (int to : g[v]) {
      d[to]--;
      if (!d[to]) s.push(to);
    }
  }
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
  cout << "\n";
  return 0;
}
