#include <bits/stdc++.h>
#pragma comment(linker, "/stack:20000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,sse3,sse4,popcnt,abm,mmx")
using namespace std;
const int N = 1e5 + 7, inf = 1e9 + 7, mod = 1e9 + 7;
const long long linf = (long long)1e18 + 7;
const int dx[] = {-1, 0, 1, 0, 1, -1, -1, 1},
          dy[] = {0, 1, 0, -1, 1, -1, 1, -1};
int get_int() {
  char x = getchar();
  bool mns = 0;
  while (!isdigit(x)) mns |= x == '-', x = getchar();
  int res = 0;
  while (isdigit(x)) res = res * 10 + x - '0', x = getchar();
  if (mns) res = -res;
  return res;
}
void add(int &x, int y) {
  x += y;
  if (x >= mod) x -= mod;
  if (x < 0) x += mod;
}
int mult(int x, int y) { return x * 1ll * y % mod; }
int sum(int x, int y) {
  add(x, y);
  return x;
}
int n, m;
int ans[N], cnt[N];
vector<int> g[N], rv[N];
void solve() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int v, u;
    scanf("%d%d", &v, &u);
    g[v].push_back(u);
    rv[u].push_back(v);
  }
  set<pair<int, int> > st;
  for (int i = 1; i <= n; i++) {
    st.insert({(int)g[i].size(), -i});
    cnt[i] = (int)g[i].size();
  }
  int ptr = n;
  while ((int)st.size()) {
    pair<int, int> v = *st.begin();
    st.erase(st.begin());
    ans[-v.second] = ptr--;
    for (auto it : rv[-v.second]) {
      st.erase({cnt[it]--, -it});
      st.insert({cnt[it], -it});
    }
  }
  for (int i = 1; i <= n; i++) {
    printf("%d ", ans[i]);
  }
}
int main() {
  int t = 1;
  while (t--) solve();
  exit(0);
}
