#include <bits/stdc++.h>
using namespace std;
static const int MAX_N = 1e5 + 5;
int indegree[2 * MAX_N];
int res[2 * MAX_N];
vector<int> V[2 * MAX_N];
priority_queue<int, vector<int>, less<int> > pq;
int main() {
  int n, m;
  while (scanf("%d%d", &n, &m) != EOF) {
    memset(indegree, 0, sizeof(indegree));
    for (int i = 0; i < 2 * MAX_N; i++) {
      V[i].clear();
    }
    int v, u;
    for (int i = 0; i < m; i++) {
      scanf("%d%d", &v, &u);
      V[u].push_back(v);
      indegree[v]++;
    }
    for (int i = 1; i <= n; i++) {
      if (!indegree[i]) {
        pq.push(i);
      }
    }
    int cur = n;
    while (!pq.empty()) {
      u = pq.top();
      pq.pop();
      res[u] = cur--;
      for (int i = 0; i < V[u].size(); i++) {
        v = V[u][i];
        indegree[v]--;
        if (!indegree[v]) {
          pq.push(v);
        }
      }
    }
    for (int i = 1; i < n; i++) {
      printf("%d ", res[i]);
    }
    printf("%d\n", res[n]);
  }
  return 0;
}
