#include <bits/stdc++.h>
using namespace std;
const int MAXN = 500005;
int in[MAXN], n, m;
vector<int> adj[MAXN];
priority_queue<int> pq;
vector<int> ans;
int output[MAXN];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    int u, v;
    cin >> u >> v;
    adj[v].push_back(u);
    in[u]++;
  }
  for (int i = 1; i <= n; i++) {
    if (in[i] == 0) {
      pq.push(i);
    }
  }
  int tm = n + 1;
  while (!pq.empty()) {
    int here = pq.top();
    pq.pop();
    output[here] = --tm;
    for (int i = 0; i < adj[here].size(); i++) {
      int there = adj[here][i];
      in[there]--;
      if (in[there] == 0) pq.push(there);
    }
  }
  for (int i = 1; i <= n; i++) cout << output[i] << ' ';
  return 0;
}
