#include <bits/stdc++.h>
using namespace std;
int32_t seed;
mt19937 rng(seed = chrono::steady_clock::now().time_since_epoch().count());
inline int32_t rnd(int32_t l = 0, int32_t r = numeric_limits<int32_t>::max()) {
  return uniform_int_distribution<int32_t>(l, r)(rng);
}
template <typename T, typename G>
ostream& operator<<(ostream& out, const pair<T, G>& a) {
  return out << "( " << a.first << ", " << a.second << ")";
}
template <typename T>
ostream& operator<<(ostream& out, const vector<T>& a) {
  out << "[ ";
  for (const auto& i : a) out << i << ", ";
  return out << "]" << endl;
}
template <typename T>
ostream& operator<<(ostream& out, const set<T>& a) {
  out << "{ ";
  for (const auto& i : a) out << i << ", ";
  return out << "}" << endl;
}
template <typename T, typename G>
ostream& operator<<(ostream& out, const map<T, G>& a) {
  out << "< ";
  for (const auto& i : a) out << i << ", ";
  return out << ">" << endl;
}
template <typename T, size_t N>
typename enable_if<!is_same<typename remove_cv<T>::type, char>::value,
                   ostream&>::type
operator<<(ostream& out, T (&a)[N]) {
  out << "[ ";
  for (const auto& i : a) out << i << ", ";
  return out << "]" << endl;
}
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << (H) << ' ';
  debug_out(T...);
}
int32_t n, m;
vector<vector<int32_t> > adjlst;
vector<int32_t> topo, idgr;
bool topological_sort() {
  idgr.assign(n + 1, 0);
  priority_queue<int32_t, vector<int32_t>, less<int32_t> > pq;
  for (int32_t i = 1; i <= n; ++i) {
    for (auto u : adjlst[i]) idgr[u]++;
  }
  for (int32_t i = 1; i <= n; ++i)
    if (!idgr[i]) pq.push(i);
  while (!pq.empty()) {
    auto u = pq.top();
    pq.pop();
    topo.push_back(u);
    for (auto i : adjlst[u]) {
      idgr[i]--;
      if (!idgr[i]) pq.push(i);
    }
  }
  return topo.size() == n;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  adjlst.resize(n + 1);
  for (int32_t i = 0; i < m; ++i) {
    int32_t u, v;
    cin >> u >> v;
    adjlst[v].push_back(u);
  }
  topological_sort();
  reverse(topo.begin(), topo.end());
  vector<int32_t> ans(n + 1);
  for (int32_t i = 0; i < n; ++i) ans[topo[i]] = i + 1;
  for (int32_t i = 0; i < n; ++i) cout << ans[i + 1] << ' ';
  return 0;
}
