#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 9;
int head[maxn], Next[maxn], ver[maxn], deg[maxn], k, cnt, a[maxn];
int n, m;
void topsort() {
  priority_queue<int> q;
  priority_queue<int> Q;
  while (!q.empty()) q.pop();
  for (int i = 1; i <= n; i++) {
    if (deg[i] == 0) {
      q.push(i);
    }
  }
  while (!q.empty()) {
    int x = q.top();
    q.pop();
    a[x] = cnt--;
    for (int i = head[x]; i; i = Next[i]) {
      int y = ver[i];
      if ((--deg[y]) == 0) q.push(y);
    }
  }
}
int main() {
  while (scanf("%d%d", &n, &m) != EOF) {
    k = 0;
    cnt = n;
    for (int i = 1; i <= m; i++) {
      int y, x;
      scanf("%d%d", &y, &x);
      ver[i] = y;
      Next[i] = head[x], head[x] = i;
      deg[y]++;
    }
    topsort();
    for (int i = 1; i <= n; i++) {
      if (i != n)
        printf("%d ", a[i]);
      else
        printf("%d\n", a[i]);
    }
  }
  return 0;
}
