#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 0x7ffffff;
const int magic = 348;
priority_queue<int> q;
vector<int> v[100048];
int cnt[100048], ans[100048];
int n, e;
int main() {
  int i, first, second;
  scanf("%d%d", &n, &e);
  for (i = 1; i <= e; i++) {
    scanf("%d%d", &first, &second);
    v[second].push_back(first);
    cnt[first]++;
  }
  for (i = 1; i <= n; i++)
    if (cnt[i] == 0) q.push(i);
  int tot = n;
  while (!q.empty()) {
    first = q.top();
    q.pop();
    ans[first] = tot--;
    for (i = 0; i < v[first].size(); i++) {
      cnt[v[first][i]]--;
      if (cnt[v[first][i]] == 0) q.push(v[first][i]);
    }
  }
  for (i = 1; i <= n; i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}
