#include <bits/stdc++.h>
using namespace std;
int color[30100];
vector<int> ans;
set<int> adj[30100];
void dfs(int s) {
  if (!color[s]) {
    color[s] = 1;
    for (int e : adj[s]) {
      if (adj[e].find(s) != adj[e].end()) {
        cout << "-1";
        exit(0);
      }
      dfs(e);
    }
    color[s] = 2;
    ans.push_back(s);
  }
}
int main() {
  int i, j, k;
  int n, m;
  int u, v;
  cin >> n >> m;
  for (i = 0; i < m; i++) {
    cin >> u >> v;
    adj[u].insert(v);
  }
  memset(color, 0, sizeof(color));
  for (i = 1; i <= n; i++) {
    if (!color[i]) dfs(i);
  }
  for (i = 0; i < n; i++) cout << ans[i] << " ";
  return 0;
}
