#include <bits/stdc++.h>
using namespace std;
template <typename T>
using v = vector<T>;
const long long inf = 4611686018427387903;
const long double EPS = 1e-11;
void read() {}
template <typename Arg, typename... Args>
void read(Arg& arg, Args&... args) {
  cin >> (arg);
  read(args...);
}
void print() {}
template <typename Arg, typename... Args>
void print(Arg arg, Args... args) {
  cout << (arg) << " ";
  print(args...);
}
int getInt() {
  int a;
  cin >> a;
  return a;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int N = 1e5 + 1;
vector<int> g[N];
void run() {
  int n, m;
  read(n, m);
  int in[n];
  memset(in, 0, sizeof in);
  for (int i = (0); i < (m); i++) {
    int v, u;
    read(v, u);
    v--;
    u--;
    g[u].push_back(v);
    in[v]++;
  }
  priority_queue<int> cur;
  for (int i = (0); i < (n); i++)
    if (in[i] == 0) cur.push(i);
  int ans[n];
  for (int p = n; p > 0; p--) {
    int c = cur.top();
    cur.pop();
    ans[c] = p;
    for (int i : g[c]) {
      in[i]--;
      if (in[i] == 0) cur.push(i);
    }
  }
  for (int i = (0); i < (n); i++) print(ans[i]);
}
signed main() {
  srand(time(0));
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(12);
  run();
}
