#include <bits/stdc++.h>
using namespace std;
const long long N = 500005;
const long long mod = 1e9 + 7;
vector<long long> adj[N];
vector<bool> vis(N);
vector<long long> in(N), out(N), a(N);
long long n;
void solve() {
  long long x = 0, y = 0, c = 0, ans;
  long long m, k;
  cin >> n >> m;
  ans = n;
  for (long long i = 0; i < m; ++i) {
    cin >> x >> y;
    adj[y].push_back(x);
    out[x]++;
    in[y]++;
  }
  priority_queue<long long> nodes;
  for (long long i = 1; i <= n; ++i) {
    if (out[i] == 0) nodes.push(i);
  }
  while (!nodes.empty()) {
    x = nodes.top();
    nodes.pop();
    a[x] = ans--;
    for (auto i : adj[x]) {
      out[i]--;
      if (out[i] == 0) nodes.push(i);
    }
  }
  for (long long i = 1; i <= n; ++i) {
    cout << a[i] << " ";
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
