#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 10;
int n, m;
vector<int> rG[MAXN];
vector<int> topolist;
priority_queue<int, vector<int>, less<int> > Q;
int a[MAXN], c[MAXN];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    c[x]++;
    rG[y].push_back(x);
  }
  for (int i = 1; i <= n; i++)
    if (c[i] == 0) Q.push(i);
  int N = n;
  while (!Q.empty()) {
    int x = Q.top();
    Q.pop();
    a[x] = N--;
    for (int i = 0; i < rG[x].size(); i++) {
      if (--c[rG[x][i]] == 0) Q.push(rG[x][i]);
    }
  }
  for (int i = 1; i <= n; i++) {
    printf("%d ", a[i]);
  }
  return 0;
}
