#include <bits/stdc++.h>
const int MAX = 1e5 + 11;
using namespace std;
int W[MAX];
vector<int> A[MAX], P;
void dfs(int v) {
  if (W[v]) return;
  W[v] = 1;
  for (int i = 0; i < (int((A[v]).size())); ++i) dfs(A[v][i]);
  P.push_back(v);
}
int main() {
  int N, M;
  scanf("%d%d", &N, &M);
  for (int i = 0; i < (M); ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    A[x].push_back(y);
  }
  vector<vector<int>> res;
  int mx = 0;
  for (int i = (1); i <= (N); ++i) {
    if (!W[i]) {
      P = vector<int>();
      dfs(i);
      res.push_back(P);
      mx = max(mx, int((P).size()));
    }
  }
  for (int i = 0; i < (MAX); ++i) sort(A[i].begin(), A[i].end());
  vector<int> ans;
  for (int i = 0; i < (int((res).size())); ++i) {
    for (int j = 0; j < (int((res[i]).size())); ++j) {
      ans.push_back(res[i][j]);
    }
  }
  for (int i = (1); i < (int((ans).size())); ++i) {
    if (binary_search(A[ans[i - 1]].begin(), A[ans[i - 1]].end(), ans[i])) {
      printf("-1");
      return 0;
    }
  }
  for (int i = 0; i < (int((ans).size())); ++i) printf("%d ", ans[i]);
  return 0;
}
