#include <bits/stdc++.h>
using namespace std;
const int maxn = 3E4 + 5;
const int maxm = 1E5 + 5;
int n, m, cnt;
int ans[maxn];
bool vis[maxn];
vector<int> to[maxn];
void DFS(int u, int fa) {
  vis[u] = 1;
  for (int i = 0; i < to[u].size(); ++i) {
    int v = to[u][i];
    if (!vis[v])
      DFS(v, u);
    else if (v == fa) {
      puts("-1");
      exit(0);
    }
  }
  ans[++cnt] = u;
}
int main() {
  scanf("%d%d", &n, &m);
  while (m--) {
    int x, y;
    scanf("%d%d", &x, &y);
    to[x].push_back(y);
  }
  for (int i = 1; i <= n; ++i)
    if (!vis[i]) DFS(i, 0);
  for (int i = 1; i <= n; ++i) printf("%d ", ans[i]);
}
