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