#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long linf = 1e18;
const int N = 100000 + 10;
const double eps = 1e-5;
const int mo = 1e9 + 7;
int n, m;
vector<int> g[N];
int deg[N];
struct node {
  int level;
  int id;
  bool operator<(node a) const { return id < a.id; }
};
priority_queue<node> pq;
int cnt;
int num[N];
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  scanf("%d %d", &n, &m);
  int x, y;
  cnt = n;
  for (int i = 1; i <= m; i++) {
    scanf("%d %d", &x, &y);
    g[y].push_back(x);
    ++deg[x];
  }
  for (int i = 1; i <= n; i++)
    if (deg[i] == 0) pq.push(node{1, i});
  while (pq.size()) {
    node t = pq.top();
    pq.pop();
    int l = t.level;
    int id = t.id;
    num[id] = cnt--;
    for (int i = 0; i < g[id].size(); i++) {
      x = g[id][i];
      if (--deg[x] == 0) {
        pq.push(node{l + 1, x});
      }
    }
  }
  for (int i = 1; i <= n; i++) printf("%d ", num[i]);
}
