#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int N = 100005;
vector<int> g[N];
int deg[N];
int lab[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  while (m-- > 0) {
    int v1, v2;
    cin >> v1 >> v2;
    g[v2].emplace_back(v1);
    deg[v1]++;
  }
  set<pair<int, int>> a;
  for (int i = 1; i <= n; ++i) {
    a.insert(make_pair(deg[i], -i));
  }
  vector<int> ans;
  while (!a.empty()) {
    int x = -a.begin()->second;
    ans.emplace_back(x);
    a.erase(a.begin());
    for (auto &&y : g[x]) {
      if (a.find(make_pair(deg[y], -y)) != a.end()) {
        a.erase(make_pair(deg[y], -y));
        deg[y]--;
        a.insert(make_pair(deg[y], -y));
      }
    }
  }
  reverse((ans).begin(), (ans).end());
  for (int i = 0; i <= n - 1; ++i) {
    lab[ans[i]] = i + 1;
  }
  for (int i = 1; i <= n; ++i) {
    cout << lab[i] << ' ';
  }
  cout << endl;
  return 0;
}
