#include <unordered_map>
#include <vector>
#include <iostream>
#include <algorithm>
#include <functional>
#include <stack>
#include <cassert>

using namespace std;

void dfs(const unordered_multimap<int, int>& graph, vector<int>& color, int node, const function<void(int)> post_order_func)
{
  stack<int> nodes;
  nodes.push(node);

  while (!nodes.empty())
  {
    int from = nodes.top();

    if (color[from] == 1)
    {
      color[from] = 2;
      post_order_func(from);
      nodes.pop();
      continue;
    }
    else if (color[from] == 2)
    {
      nodes.pop();
      continue;
    }

    color[from] = 1;
    auto range = graph.equal_range(from);

    for (auto it = range.first; it != range.second; ++it)
    {
      const auto& to = it->second;
      if (color[to] == 0)
      {
        nodes.push(to);
      }
      else if (color[to] == 1)
      {
        throw runtime_error("Graph has cycle. Topological sort impossible.");
      }
    }
  }
}

void topological_sort(int n, const unordered_multimap<int, int>& graph, vector<int>& result)
{
  result.resize(n);
  vector<int> color(n, 0);
  int j = 0;
  auto post_order_func = [&result, &j](int node) {
    result[j++] = node;
  };

  for (int i = 0; i < n; ++i)
  {
    if (color[i] == 0)
    {
      dfs(graph, color, i, post_order_func);
    }
  }

  reverse(begin(result), end(result));
}

int main()
{
  int n, m;

  cin >> n >> m;

  unordered_multimap<int, int> graph;
  vector<int> result(n, -1);

  for (int i = 0; i < m; ++i)
  {
    int from, to;
    cin >> from >> to;
    --from;
    --to;
    graph.emplace(from, to);
  }

  try
  {
    topological_sort(n, graph, result);
  }
  catch (...)
  {
    cout << -1 << endl;
    return 0;
  }

  for (int i = 0; i < result.size(); ++i)
  {
    cout << result[i] + 1 << (i + 1 == result.size() ? '\n' : ' ');
  }
}