#include <bits/stdc++.h>
using namespace std;
int n, m, d[222222], tot, ans[222222];
int TOT, EN[222222], NE[222222], LA[222222];
void ADD(int x, int y) {
  TOT++;
  EN[TOT] = y;
  NE[TOT] = LA[x];
  LA[x] = TOT;
}
priority_queue<int> q;
int main() {
  int i, j, x, y;
  cin >> n >> m;
  for (i = 1; i <= m; i++) {
    scanf("%d%d", &x, &y);
    d[x]++;
    ADD(y, x);
  }
  for (i = 1; i <= n; i++)
    if (d[i] == 0) q.push(i);
  tot = n;
  while (!q.empty()) {
    x = q.top();
    q.pop();
    ans[x] = tot--;
    for (i = LA[x]; i; i = NE[i]) {
      y = EN[i];
      if (d[y] > 0) {
        d[y]--;
        if (d[y] == 0) q.push(y);
      }
    }
  }
  for (i = 1; i <= n; i++) printf("%d ", ans[i]);
}
