#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
const int INF = 1e9 + 7;
const int N = (1 << 22) | 7;
const int M = 5e6 + 7;
int f[N], pre[N], key[N];
int a[30], ans[30];
int n, m, cnt;
void bfs() {
  queue<int> q;
  memset(key, -1, sizeof(key));
  memset(pre, -1, sizeof(pre));
  for (int i = 0; i < n; i++) {
    q.push(a[i]);
    f[a[i]] = 1;
    key[a[i]] = i;
  }
  while (q.size()) {
    int now = q.front();
    q.pop();
    for (int i = 0; i < n; i++)
      if (now & (1 << i)) {
        int temp = now | a[i];
        if (!f[temp]) {
          f[temp] = f[now] + 1;
          key[temp] = i;
          pre[temp] = now;
          q.push(temp);
          if (temp + 1 == (1 << n)) return;
        }
      }
  }
}
signed main() {
  scanf("%d", &n);
  scanf("%d", &m);
  for (int i = 0; i < n; i++) a[i] = 1 << i;
  for (int i = 1, u, v; i <= m; i++) {
    scanf("%d", &u);
    scanf("%d", &v);
    u--;
    v--;
    a[u] |= 1 << v;
    a[v] |= 1 << u;
  }
  if (m == n * (n - 1) >> 1)
    puts("0");
  else {
    bfs();
    cnt = 0;
    int now = (1 << n) - 1;
    printf("%d\n", f[now]);
    while (~now) {
      printf("%d ", key[now] + 1);
      now = pre[now];
    }
    puts("");
  }
  return 0;
}
