#include <bits/stdc++.h>
int n, m, a[100001], d[100001];
std::vector<int> e[100001];
std::priority_queue<int> q;
using namespace std;
int main() {
  for (scanf("%d%d", &n, &m); m--;) {
    int u, v;
    scanf("%d%d", &v, &u);
    --u;
    --v;
    e[u].push_back(v);
    ++d[v];
  }
  for (int i = 0; i < n; ++i)
    if (!d[i]) q.push(i);
  for (int i = n; !q.empty();) {
    int c = q.top();
    q.pop();
    a[c] = i--;
    for (auto& u : e[c])
      if (!--d[u]) q.push(u);
  }
  for (int i = 0; i < n; ++i) printf("%d ", a[i]);
  return 0;
}
