#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
const int MAXM = 1e5 + 10;
struct Edge {
  int to, nxt;
};
int n, m, cnt_e;
int head[MAXN];
int deg[MAXN];
Edge e[MAXM << 1];
inline void addedge(int u, int v) {
  e[++cnt_e].to = v;
  e[cnt_e].nxt = head[u];
  head[u] = cnt_e;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    addedge(v, u);
    deg[u]++;
  }
  static int ans[MAXN];
  priority_queue<int> pq;
  for (int i = 1; i <= n; i++)
    if (!deg[i]) pq.push(i);
  int cnt = n;
  while (!pq.empty()) {
    int u = pq.top();
    pq.pop();
    ans[u] = cnt--;
    for (int i = head[u]; i; i = e[i].nxt) {
      int v = e[i].to;
      deg[v]--;
      if (!deg[v]) pq.push(v);
    }
  }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  return 0;
}
