#include <bits/stdc++.h>
using namespace std;
int f[(1 << 22) + 10], pre[(1 << 22) + 10], key[(1 << 22) + 10];
int a[30], ans[30], cnt, n, m;
queue<int> q;
void bfs() {
  memset(f, 0, sizeof(f));
  memset(key, -1, sizeof(key));
  memset(pre, -1, sizeof(pre));
  for (int i = 0; i < n; i++) {
    f[a[i]] = 1;
    key[a[i]] = i;
    q.push(a[i]);
  }
  int now, tmp;
  while (!q.empty()) {
    now = q.front();
    q.pop();
    for (int i = 0; i < n; i++) {
      if (now & (1 << i)) {
        tmp = now | a[i];
        if (!f[tmp]) {
          f[tmp] = f[now] + 1;
          key[tmp] = i;
          pre[tmp] = now;
          q.push(tmp);
          if (tmp == ((1 << n) - 1)) {
            return;
          }
        }
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    a[i] |= (1 << i);
  }
  for (int i = 1; i <= m; i++) {
    int from, to;
    cin >> from >> to;
    from--;
    to--;
    a[from] |= (1 << to);
    a[to] |= (1 << from);
  }
  if (m == n * (n - 1) / 2) {
    cout << 0 << endl;
    return 0;
  }
  bfs();
  cnt = 0;
  int now = (1 << n) - 1;
  while (~now) {
    ans[++cnt] = key[now];
    now = pre[now];
  }
  cout << cnt << endl;
  while (cnt) {
    cout << ans[cnt--] + 1 << " ";
  }
  return 0;
}
