#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
int ni() {
  int val;
  scanf("%i", &val);
  return val;
}
pair<int, int> npi() {
  pair<int, int> val;
  scanf("%i %i", &val.first, &val.second);
  return val;
}
int64_t nll() {
  int64_t val;
  scanf("%I64d", &val);
  return val;
}
vector<int> nvi(int n, int corr = 0) {
  vector<int> a(n);
  for (int i = 0; i < n; ++i) a[i] = ni() + corr;
  return move(a);
}
char nc() {
  char val;
  do {
    val = getchar();
  } while (val == ' ' || val == '\r' || val == '\n');
  return val;
}
char ncs() {
  char val;
  do {
    val = getchar();
  } while (false);
  return val;
}
string ns() {
  static char buff[1024 * 4000];
  scanf("%s", buff);
  return string{buff};
}
int64_t gcd(int64_t a, int64_t b) {
  while (b) {
    auto tmp = a % b;
    a = b;
    b = tmp;
  }
  return a;
}
int64_t tr2(int xv1, int yv1, int xv2, int yv2, int x3, int y3) {
  return 1LL * (xv2 - xv1) * (y3 - yv1) - 1LL * (yv2 - yv1) * (x3 - xv1);
}
const long double eps = 1e-12;
const long double pi = acos(-1.0);
bool eq(long double a, long double b) { return abs(a - b) <= eps; }
int8_t bits_cnt[256];
const string input_dir = "inputs\\";
string input_file = input_dir + "input.txt";
string output_file = input_dir + "output.txt";
void init_streams() {}
void init_data() {
  for (int i = 1; i <= 255; ++i)
    for (int j = 0; j < 8; ++j)
      if ((1 << j) & i) ++bits_cnt[i];
}
int bit_count(int v) {
  return bits_cnt[v & 0xFF] + bits_cnt[(v >> 8) & 0xFF] +
         bits_cnt[(v >> 16) & 0xFF] + bits_cnt[(v >> 24) & 0xFF];
}
const int maxn = 24;
const int inf = 1000;
int8_t g[maxn][maxn];
bitset<24> gb[maxn];
int isf[1 << 22];
int bp[1 << 22];
int bits[22], cb = 0, n = 0;
bool solve(int mask) {
  cb = 0;
  auto m = mask;
  while (m) {
    auto lb = m - ((m - 1) & m);
    bits[cb++] = bp[lb];
    m -= lb;
  }
  auto connected = mask == 0;
  for (int i = 0; i < cb; ++i) {
    auto bit = bits[i];
    auto submask = mask & ~(1 << bit);
    if (isf[submask]) {
      connected = submask == 0;
      for (int j = 0; !connected && j < cb; ++j)
        if (j != i) {
          connected = connected || g[bit][bits[j]];
        }
      break;
    }
  }
  isf[mask] = connected;
  if (connected) {
    bitset<24> nb;
    for (int i = 0; i < cb; ++i) nb |= gb[bits[i]];
    nb |= mask;
    if (nb.count() == n) return true;
    if (mask == 0) {
      if (n == 1) return true;
      bool full = true;
      for (int i = 0; i < n; ++i)
        for (int j = i + 1; j < n; ++j) full = full && g[i][j];
      return full;
    }
  }
  return false;
}
int main() {
  init_streams();
  init_data();
  n = ni();
  auto m = ni();
  for (int i = 0; i < m; ++i) {
    auto a = ni() - 1, b = ni() - 1;
    g[a][b] = g[b][a] = 1;
    gb[a].set(b);
    gb[b].set(a);
  }
  for (int i = 0; i < n; ++i) bp[1 << i] = i;
  isf[0] = true;
  int best = maxn;
  vector<int> ans;
  for (int i = 0; i < (1 << n); ++i) {
    auto msk = i;
    if (solve(msk)) {
      if (cb < best) {
        best = cb;
        ans.assign(&bits[0], &bits[0] + cb);
      }
    }
  }
  if (best == maxn)
    cout << "0" << endl;
  else {
    cout << best << endl;
    for (auto v : ans) cout << v + 1 << " ";
  }
  return 0;
}
