#include <bits/stdc++.h>
using namespace std;
long long int modexp(long long int a, long long int b) {
  long long int res = 1;
  while (b) {
    res = b & 1 ? (res * a) % 1000000007 : res;
    a = (a * a) % 1000000007;
    b >>= 1;
  }
  return res;
}
int p[100005], vis[100005];
inline int findset(int i) {
  while (i != p[i]) {
    p[i] = p[p[i]];
    i = p[i];
  }
  return i;
}
vector<int> vt[100005], wt[100005];
queue<int> ord[100005];
void dfs(int v, int w) {
  vis[v] = 1;
  for (auto g : vt[v])
    if (!vis[g]) dfs(g, w);
  ord[w].push(v);
}
int ans[100005];
void pre() {
  priority_queue<int> pq;
  pq.push(1);
  pq.push(2);
  pq.push(3);
  cout << pq.top() << endl;
  pq.pop();
  cout << pq.top() << endl;
  pq.pop();
  cout << pq.top() << endl;
}
int d[100005];
int main() {
  int n, m, i, j, u, v, pu, pv;
  cin >> n >> m;
  for (i = 1; i <= n; ++i) p[i] = i;
  for (i = 0; i < m; ++i) {
    cin >> u >> v;
    vt[v].push_back(u);
    d[u]++;
  }
  priority_queue<int> pq;
  for (i = 1; i <= n; ++i)
    if (!d[i]) pq.push(i);
  int z = n;
  while (pq.size()) {
    u = pq.top();
    pq.pop();
    ans[u] = z--;
    d[u] = -1;
    for (auto g : vt[u]) {
      d[g]--;
      if (!d[g]) pq.push(g);
    }
  }
  for (i = 1; i <= n; ++i) cout << ans[i] << " ";
  cout << endl;
}
