#include <bits/stdc++.h>
using namespace std;
const int N = (1 << 22) + 10;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);
const double eps = 1e-10;
int dcmp(double first) {
  if (fabs(first) < eps) return 0;
  return first < 0 ? -1 : 1;
}
int nex[N];
int num[50];
int dp[N], vis[N], n;
pair<int, int> p[N];
queue<int> q;
void dfs(int first, int lt) {
  if (vis[first]) return;
  vis[first] = 1;
  int f = 1;
  for (int i = 0; i < n; i++)
    if (!((first >> i) & 1) && ((lt >> i) & 1)) {
      dfs(first | (1 << i), lt & nex[i]);
      f = 0;
    }
  if (f) {
    q.push(first);
    dp[first] = 0;
  }
}
int main() {
  int m;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    u--;
    v--;
    nex[u] |= (1 << v);
    nex[v] |= (1 << u);
  }
  memset(dp, INF, sizeof(dp));
  for (int i = 0; i < n; i++) {
    dfs(1 << i, nex[i]);
  }
  while (!q.empty()) {
    int l = q.front();
    q.pop();
    vis[l] = 0;
    for (int i = 0; i < n; i++) {
      if ((l >> i) & 1) {
        int t = l | nex[i];
        if (dp[t] > dp[l] + 1) {
          dp[t] = dp[l] + 1;
          p[t] = make_pair(l, i);
          if (!vis[t]) {
            q.push(t);
            vis[t] = 1;
          }
        }
      }
    }
  }
  printf("%d\n", dp[(1 << n) - 1]);
  for (int k = (1 << n) - 1; dp[k]; k = p[k].first)
    printf("%d ", p[k].second + 1);
  return 0;
}
