#include <bits/stdc++.h>
using namespace std;
int label[2 * 100010], outdegree[2 * 100010];
vector<int> V[2 * 100010];
priority_queue<int> pq;
int main() {
  int n, m, i, a, b;
  cin >> n >> m;
  for (i = 0; i < m; i++) {
    cin >> a >> b;
    V[b].push_back(a);
    outdegree[a]++;
  }
  for (i = 1; i <= n; i++)
    if (outdegree[i] == 0) pq.push(i);
  int counter = n;
  while (!pq.empty()) {
    int top_elem = pq.top();
    pq.pop();
    label[top_elem] = counter;
    counter--;
    for (i = 0; i < V[top_elem].size(); i++) {
      outdegree[V[top_elem][i]]--;
      if (outdegree[V[top_elem][i]] == 0) pq.push(V[top_elem][i]);
    }
  }
  for (i = 1; i <= n; i++) cout << label[i] << " ";
}
