#include <bits/stdc++.h>
int bsf(int x) { return __builtin_ctz(x); }
int bsr(int x) { return 31 - __builtin_clz(x); }
using namespace std;
const double pi = 3.14159265358979323846;
const int inf = (int)2e+9 + 2;
const double eps = 1e-8;
const int N = 100000;
int n, m, k, out[N], mark[N];
vector<int> g[N];
set<int, greater<int> > st;
void solve() {
  scanf("%d%d", &n, &m);
  for (auto i = 0; i < m; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    --x;
    --y;
    ++out[x];
    g[y].push_back(x);
  }
  for (auto i = 0; i < n; ++i) {
    if (!out[i]) st.insert(i);
  }
  for (auto i = 0; i < n; ++i) {
    int v = *st.begin();
    st.erase(st.begin());
    mark[v] = n - i;
    for (auto to : g[v]) {
      --out[to];
      if (!out[to]) st.insert(to);
    }
  }
  for (auto i = 0; i < n; ++i) printf("%d ", mark[i]);
}
int main() {
  int t = 1;
  for (; t; --t) solve();
  return 0;
}
