#include <bits/stdc++.h>
using namespace std;
const double pi = 3.1415926535897932384626433832795;
const int inf = 1e9;
const long long inf2 = 1e18;
const int mod = 1e9 + 7;
void boost() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
const int N = 1e5 + 5;
vector<int> adj[N], cnt(N, 0), vis(N, 0);
priority_queue<int> second;
void dfs(int u) {
  vis[u] = true;
  if (cnt[u] == 0) {
    second.push(u);
  }
  for (auto v : adj[u])
    if (!vis[v]) dfs(v);
}
void solve() {
  int n, m;
  cin >> n >> m;
  int u, v;
  for (int i = 0; i < m; i++) {
    cin >> u >> v;
    adj[v].push_back(u);
    cnt[u]++;
  }
  for (int i = 1; i < n + 1; ++i) {
    if (!vis[i]) {
      dfs(i);
    }
  }
  int lst = n;
  vector<int> label(n + 1, 0);
  while (lst > 0) {
    u = second.top();
    vis[u] = true;
    second.pop();
    label[u] = lst--;
    for (auto v : adj[u]) {
      cnt[v]--;
      if (cnt[v] == 0) {
        second.push(v);
      }
    }
  }
  for (int i = 1; i < n + 1; ++i) {
    cout << label[i] << " ";
  }
  return;
}
int main() {
  boost();
  int tc = 1;
  while (tc--) solve();
  return 0;
}
