Bakery Line Order

Time limit1sMemory limit128 MB

Problem

Kruhko the baker makes very tasty bread. Before the bakery opens, people form a long line using the following rule.

When a new person arrives, they first check whether any of their friends are already standing in line. If at least one friend is present, the newcomer stands immediately in front of the friend who is closest to the bakery entrance. If none of their friends are in line, the newcomer stands at the end of the line.

People are numbered 1, 2, ..., N, and the given friendship relation is mutual.

For example, suppose N = 4, the friendships are 1-2, 1-3, and 3-4, and the arrival order is (2, 4, 3, 1). Then the line is formed as follows.

  • 2 arrives. The line is (2).
  • 4 arrives. Since 4 is not friends with 2, 4 stands at the end. The line is (2, 4).
  • 3 arrives. Since 3 is friends with 4, 3 stands immediately in front of 4. The line is (2, 3, 4).
  • 1 arrives. 1 is friends with both 2 and 3, but 2 is closer to the entrance, so 1 stands immediately in front of 2. The line is (1, 2, 3, 4).

Find any arrival order that makes the final line exactly (1, 2, ..., N).

Input

The first line contains two integers N and M, the number of people and the number of friendships.

2 ≤ N ≤ 300 000, 1 ≤ M ≤ 1 000 000

Each of the next M lines contains two integers a and b, meaning that people a and b are friends. Both integers are between 1 and N, inclusive.

Output

Print a valid arrival order as numbers separated by spaces. If more than one order is possible, print any one of them.

If no such order exists, print only -1.