#include <bits/stdc++.h>
using namespace std;
int n;
vector<vector<bool>> v;
bool found;
vector<int> ans, curr;
void solve(int step, int id, bool flag) {
  int i, j, k;
  if (step == 5) {
    found = true;
    ans = curr;
  } else {
    if (found) return;
    for (i = id; i <= n; i++) {
      bool valid = true;
      for (auto p : curr) {
        if (v[p][i] != flag) {
          valid = false;
          break;
        }
      }
      if (valid) {
        curr.push_back(i);
        solve(step + 1, i + 1, flag);
        curr.pop_back();
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int m, a, b, i, j, k;
  cin >> n >> m;
  if (n > 48) n = 48;
  v.assign(n + 1, vector<bool>(n + 1, false));
  for (i = 0; i < m; i++) {
    cin >> a >> b;
    if ((a <= n) && (b <= n)) {
      v[a][b] = true;
      v[b][a] = true;
    }
  }
  found = false;
  solve(0, 1, true);
  if (!found) {
    solve(0, 1, false);
  }
  if (!found)
    cout << "-1\n";
  else {
    for (auto p : ans) cout << p << " ";
    cout << "\n";
  }
  return 0;
}

### Prompt

Generate a cpp solution to the following problem:

On the great island of Baltia, there live N people, numbered from 1 to N. There are exactly M pairs of people that are friends with each other. The people of Baltia want to organize a successful party, but they have very strict rules on what a party is and when the party is successful. On the island of Baltia, a party is a gathering of exactly 5 people. The party is considered to be successful if either all the people at the party are friends with each other (so that they can all talk to each other without having to worry about talking to someone they are not friends with) or no two people at the party are friends with each other (so that everyone can just be on their phones without anyone else bothering them). Please help the people of Baltia organize a successful party or tell them that it's impossible to do so.

Input

The first line contains two integer numbers, N (5 ≤ N ≤ 2*10^5) and M (0 ≤ M ≤ 2*10^5) – the number of people that live in Baltia, and the number of friendships. The next M lines each contains two integers U_i and V_i (1 ≤ U_i,V_i ≤ N) – meaning that person U_i is friends with person V_i. Two friends can not be in the list of friends twice (no pairs are repeated) and a person can be friends with themselves (U_i ≠ V_i).

Output

If it's possible to organize a successful party, print 5 numbers indicating which 5 people should be invited to the party. If it's not possible to organize a successful party, print -1 instead. If there are multiple successful parties possible, print any.

Examples

Input


6 3
1 4
4 2
5 4


Output


1 2 3 5 6


Input


5 4
1 2
2 3
3 4
4 5


Output


-1

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
int n;
vector<vector<bool>> v;
bool found;
vector<int> ans, curr;
void solve(int step, int id, bool flag) {
  int i, j, k;
  if (step == 5) {
    found = true;
    ans = curr;
  } else {
    if (found) return;
    for (i = id; i <= n; i++) {
      bool valid = true;
      for (auto p : curr) {
        if (v[p][i] != flag) {
          valid = false;
          break;
        }
      }
      if (valid) {
        curr.push_back(i);
        solve(step + 1, i + 1, flag);
        curr.pop_back();
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int m, a, b, i, j, k;
  cin >> n >> m;
  if (n > 48) n = 48;
  v.assign(n + 1, vector<bool>(n + 1, false));
  for (i = 0; i < m; i++) {
    cin >> a >> b;
    if ((a <= n) && (b <= n)) {
      v[a][b] = true;
      v[b][a] = true;
    }
  }
  found = false;
  solve(0, 1, true);
  if (!found) {
    solve(0, 1, false);
  }
  if (!found)
    cout << "-1\n";
  else {
    for (auto p : ans) cout << p << " ";
    cout << "\n";
  }
  return 0;
}

```