#include <bits/stdc++.h>
using namespace std;
int n, m, x, y, layer[100001], cnt, visit[100001];
priority_queue<int> p;
vector<int> v[100001];
void bfs() {
  while (!p.empty()) {
    int u = p.top();
    layer[u] = cnt;
    cnt--;
    p.pop();
    for (int i = 0; i < v[u].size(); ++i) {
      int uu = v[u][i];
      if (layer[uu] != 0) continue;
      visit[uu]--;
      if (visit[uu] == 0) p.push(uu);
    }
  }
}
int main() {
  cin >> n >> m;
  cnt = n;
  while (m--) {
    cin >> x >> y;
    v[y].push_back(x);
    visit[x]++;
  }
  for (int i = 1; i <= n; ++i)
    if (visit[i] == 0) p.push(i);
  bfs();
  for (int i = 1; i <= n; ++i) cout << layer[i] << ' ';
}
