#include <bits/stdc++.h>
using namespace std;
const long long LLINF = LLONG_MAX;
const int INF = INT_MAX;
const int MAXN = 1e5 + 10;
const int mod = 1e9 + 7;
int n, m;
vector<int> g[MAXN];
int val[MAXN];
int deg[MAXN];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0, u, v; i < m; i++) {
    scanf("%d%d", &u, &v);
    u--, v--;
    g[v].push_back(u);
    deg[u]++;
  }
  priority_queue<int> Q;
  for (int i = 0; i < n; i++)
    if (!deg[i]) Q.push(i);
  int p = n;
  while (!Q.empty()) {
    int u = Q.top();
    Q.pop();
    val[u] = p, p--;
    for (auto it : g[u]) {
      deg[it]--;
      if (!deg[it]) Q.push(it);
    }
  }
  for (int i = 0; i < n; i++) printf("%d ", val[i]);
  return 0;
}
