#include <bits/stdc++.h>
const int maxn = 1.6e6 + 20;
const int maxm = 1e5 + 10;
const int mod = 1e9 + 7;
const long long int INF = 1e18 + 100;
const int inf = 0x3f3f3f3f;
const double pi = acos(-1.0);
const double eps = 1e-8;
using namespace std;
int head[maxn], cnt[maxn], vis[maxn], ans[maxn];
int tot, m, n;
priority_queue<int> q;
struct node {
  int u, v, next;
} edge[maxn];
void addedge(int u, int v) {
  edge[tot].u = u;
  edge[tot].v = v;
  edge[tot].next = head[u];
  head[u] = tot++;
}
void init() {
  memset(head, -1, sizeof head);
  memset(vis, 0, sizeof vis);
  memset(cnt, 0, sizeof cnt);
  while (!q.empty()) q.pop();
}
int main() {
  cin >> n >> m;
  init();
  for (int i = 1; i <= m; i++) {
    int u, v;
    cin >> u >> v;
    addedge(v, u);
    cnt[u]++;
  }
  for (int i = 1; i <= n; i++) {
    if (cnt[i] == 0) {
      q.push(i);
    }
  }
  int tmp = n;
  while (!q.empty()) {
    int u = q.top();
    ans[u] = tmp--;
    vis[u] = 1;
    q.pop();
    for (int i = head[u]; i != -1; i = edge[i].next) {
      int v = edge[i].v;
      if (vis[v]) continue;
      cnt[v]--;
      if (!cnt[v]) q.push(v);
    }
  }
  for (int i = 1; i <= n; i++) {
    if (i != n)
      printf("%d ", ans[i]);
    else
      printf("%d\n", ans[i]);
  }
}
