#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int cnt[N], ans[N];
vector<int> lst[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int u, v;
    cin >> u >> v;
    lst[v].push_back(u);
    ++cnt[u];
  }
  priority_queue<int> pq;
  for (int i = 1; i <= n; ++i) {
    if (cnt[i] == 0) pq.push(i);
  }
  int pt = n;
  while (!pq.empty()) {
    int cur = pq.top();
    pq.pop();
    ans[cur] = pt--;
    for (int i = 0; i < lst[cur].size(); ++i) {
      int nx = lst[cur][i];
      --cnt[nx];
      if (cnt[nx] == 0) pq.push(nx);
    }
  }
  for (int i = 1; i <= n; ++i) {
    cout << ans[i];
    if (i < n) cout << ' ';
  }
  cout << endl;
  return 0;
}
