#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
vector<int> G[N];
priority_queue<int> q;
int n, m, u, v, in[N], res[N];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &u, &v);
    G[v].push_back(u);
    in[u]++;
  }
  for (int i = 1; i <= n; i++)
    if (!in[i]) {
      q.push(i);
    }
  int cnt = n;
  while (!q.empty()) {
    u = q.top();
    q.pop();
    in[u] = -1;
    for (int i = 0; i < G[u].size(); i++) {
      v = G[u][i];
      in[v]--;
      if (!in[v]) q.push(v);
    }
    res[u] = cnt--;
  }
  for (int i = 1; i <= n; i++) printf("%d%c", res[i], i == n ? '\n' : ' ');
  return 0;
}
