#include <bits/stdc++.h>
using namespace std;
set<int> a[100001];
int n, m, out[100001], ans[100001];
int main() {
  scanf("%d%d", &n, &m);
  while (m--) {
    int u, v;
    scanf("%d%d", &u, &v);
    a[v].insert(u);
    out[u]++;
  }
  priority_queue<int> q;
  for (int i = 1; i <= n; i++)
    if (!out[i]) q.push(i);
  memset(ans, -1, sizeof ans);
  for (int i = n; i > 0; i--) {
    int u = q.top();
    q.pop();
    for (auto j : a[u])
      if (!--out[j] && ans[j] == -1) q.push(j);
    ans[u] = i;
  }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  putchar('\n');
  return 0;
}
