#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
vector<int> adj[N], order, tdj[N];
int ret[N], deg[N];
int main() {
  int n, i, m, a, b;
  cin >> n >> m;
  for (i = 0; i < m; ++i) {
    scanf("%d%d", &a, &b);
    adj[b].push_back(a);
    ++deg[a];
  }
  priority_queue<int> q;
  for (i = 1; i <= n; ++i)
    if (!deg[i]) q.push(i);
  int pos = 1;
  while (!q.empty()) {
    a = q.top();
    ret[a] = pos++;
    q.pop();
    for (i = 0; i < (int)adj[a].size(); ++i) {
      b = adj[a][i];
      --deg[b];
      if (!deg[b]) {
        q.push(b);
      }
    }
  }
  for (i = 0; i < n; ++i) printf("%d ", n + 1 - ret[i + 1]);
  cout << endl;
}
