#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
vector<int> dep[N];
int indeg[N];
int val[N];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int a, b;
    cin >> a >> b;
    indeg[a]++;
    dep[b].push_back(a);
  }
  priority_queue<int> pq;
  for (int i = 1; i <= n; ++i) {
    if (indeg[i] == 0) {
      pq.push(i);
    }
  }
  int cnt = n;
  for (int i = 1; i <= n; ++i) {
    int cur = pq.top();
    pq.pop();
    val[cur] = cnt--;
    for (int i = 0; i < dep[cur].size(); ++i) {
      int nx = dep[cur][i];
      indeg[nx]--;
      if (indeg[nx] == 0) {
        pq.push(nx);
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    cout << val[i] << " ";
  }
  cout << endl;
}
