#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100 * 1000 + 10;
int id[MAX_N], d[MAX_N];
vector<int> to[MAX_N];
priority_queue<int> q;
int main() {
  ios_base ::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    to[--v].push_back(--u), d[u]++;
  }
  for (int i = 0; i < n; i++)
    if (!d[i]) q.push(i);
  for (int i = n; i; i--) {
    int u = q.top();
    q.pop(), id[u] = i;
    for (auto v : to[u])
      if (!--d[v]) q.push(v);
  }
  for (int i = 0; i < n; i++) cout << id[i] << ' ';
  return 0;
}
