#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("-ffloat-store")
#pragma GCC optimize("-fno-defer-pop")
long long int power(long long int a, long long int b, long long int m) {
  if (b == 0) return 1;
  if (b == 1) return a % m;
  long long int t = power(a, b / 2, m) % m;
  t = (t * t) % m;
  if (b & 1) t = ((t % m) * (a % m)) % m;
  return t;
}
long long int modInverse(long long int a, long long int m) {
  return power(a, m - 2, m);
}
const int N = 100005;
int n, m;
vector<int> g[N], g2[N];
vector<int> order;
bool used[N];
int go[N];
int res[N];
void dfs(int v) {
  used[v] = true;
  for (int i = 0; i < g[v].size(); ++i) {
    int to = g[v][i];
    if (!used[to]) dfs(to);
  }
  order.push_back(v);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie();
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    g[x].push_back(y);
    g2[y].push_back(x);
    ++go[x];
  }
  for (int i = 1; i <= n; ++i) {
    if (!used[i]) dfs(i);
  }
  priority_queue<int> q;
  for (int i = 0; i < order.size(); ++i) {
    int v = order[i];
    if (!go[v]) q.push(v);
  }
  int sz = n;
  while (!q.empty()) {
    int v = q.top();
    q.pop();
    res[v] = sz--;
    for (int i = 0; i < g2[v].size(); ++i) {
      int to = g2[v][i];
      --go[to];
      if (!go[to]) {
        q.push(to);
      }
    }
  }
  for (int i = 1; i <= n; ++i) printf("%d ", res[i]);
  return 0;
}
