#include <bits/stdc++.h>
using namespace std;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c *x) -> decltype(std::cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug &operator<<(const c &) {
    return *this;
  }
};
const int mod1 = 1e5 + 7;
const int N = 1e6 + 7;
const int mod2 = 1e9 + 7;
const long long mod3 = 1e12 + 7;
const int si = 15;
int n, m, k, rd[mod1], num;
vector<int> son[mod1], res;
priority_queue<int, vector<int>, less<int> > pq;
int ans[mod1];
int main() {
  int x, y;
  scanf("%d%d", &n, &m);
  num = n;
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &x, &y);
    son[y].push_back(x);
    rd[x]++;
  }
  for (int i = 1; i <= n; i++) {
    if (rd[i] == 0) {
      pq.push(i);
      rd[i]--;
    }
  }
  while (!pq.empty()) {
    int p = pq.top();
    ans[p] = num--;
    debug() << " [ "
            << "ans[p]"
               ": "
            << (ans[p]) << " ] "
            << " [ "
            << "p"
               ": "
            << (p) << " ] ";
    pq.pop();
    for (int i = 0; i < son[p].size(); i++) {
      int pp = son[p][i];
      rd[pp]--;
      if (rd[pp] == 0) {
        pq.push(pp);
        rd[pp]--;
      }
    }
  }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  return 0;
}
