#include <bits/stdc++.h>
using namespace std;
int INF = 0x3f3f3f3f;
vector<int> p[100005];
int du[100005] = {0}, ans[100005] = {0};
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    p[b].push_back(a);
    du[a]++;
  }
  int hx = n;
  priority_queue<int> q;
  for (int i = 1; i <= n; i++) {
    if (du[i] == 0) q.push(i);
  }
  while (!q.empty()) {
    int x = q.top();
    q.pop();
    ans[x] = hx--;
    int len = p[x].size();
    for (int i = 0; i < len; i++) {
      int id = p[x][i];
      du[id]--;
      if (du[id] == 0) {
        q.push(id);
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    if (i != 1) printf(" ");
    printf("%d", ans[i]);
  }
  puts("");
}
