#include <bits/stdc++.h>
using namespace std;
vector<int> K[100000 + 20];
int deg[100000 + 24];
int valu[100000 + 24];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int a, b;
  memset(deg, 0, sizeof(deg));
  priority_queue<int> Q;
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &a, &b);
    K[b].push_back(a);
    deg[a]++;
  }
  for (int k = 1; k <= n; k++) {
    if (deg[k] == 0) {
      Q.push(k);
    }
  }
  int cnt = n;
  while (!Q.empty()) {
    int p = Q.top();
    Q.pop();
    valu[p] = cnt;
    cnt--;
    for (int i = 0; i < K[p].size(); i++) {
      deg[K[p][i]]--;
      if (deg[K[p][i]] == 0) {
        Q.push(K[p][i]);
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << valu[i] << ' ';
  }
  return 0;
}
