#include <bits/stdc++.h>
using namespace std;
const int maxn = (1 << 14) + 5;
int n, m, i, j, t, k, s, f[maxn], ppc[maxn], Log[maxn], N, head[15];
int lst[maxn][15][15], fst[maxn][15][15], bac[maxn][4];
bool huan[maxn], g[maxn][15][15];
struct Edge {
  int nxt, aim;
} edge[14 * 15];
inline void add_edge(int x, int y) {
  edge[++N] = (Edge){head[x], y};
  head[x] = N;
  edge[++N] = (Edge){head[y], x};
  head[y] = N;
}
void prt_route(int t0, int t1, int rout) {
  if (ppc[rout] < 1) return;
  printf("%d %d\n", 1 + t1, 1 + lst[rout][t0][t1]);
  prt_route(t0, lst[rout][t0][t1], fst[rout][t0][t1]);
}
void prt(int stat) {
  while (ppc[stat] > 1) {
    prt_route(bac[stat][0], bac[stat][1], bac[stat][2]);
    stat = bac[stat][3];
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (i = 1; i <= m; ++i) {
    scanf("%d%d", &t, &k);
    --t;
    --k;
    add_edge(t, k);
    g[(1 << t) | (1 << k)][t][k] = g[(1 << k) | (1 << t)][k][t] = 1;
    lst[(1 << t) | (1 << k)][t][k] = t;
    lst[(1 << t) | (1 << k)][k][t] = k;
  }
  Log[0] = -1;
  for (i = 1; i < (1 << n); ++i) {
    ppc[i] = ppc[i >> 1] + (i & 1);
    Log[i] = Log[i >> 1] + 1;
    for (j = 0; j < n; ++j)
      if ((i >> j) & 1)
        for (k = 0; k < n; ++k)
          if (((i >> k) & 1) && (j ^ k) && g[i][j][k])
            for (t = head[k]; t; t = edge[t].nxt) {
              s = edge[t].aim;
              if ((s == j && ppc[i] > 2) || 0 == ((i >> s) & 1)) {
                g[i | (1 << s)][j][s] = 1, fst[i | (1 << s)][j][s] = i,
                            lst[i | (1 << s)][j][s] = k;
              }
            }
  }
  memset(f, 0x3f3f3f3f, sizeof(f));
  f[0] = 0;
  for (i = 0; i < n; ++i) f[1 << i] = 0;
  for (i = 1; i < (1 << n); ++i) {
    int rv = (((1 << n) - 1) ^ i);
    for (j = rv; j; j = ((j - 1) & rv))
      for (t = 0; t < n; ++t)
        if ((i >> t) & 1)
          for (k = 0; k < n; ++k)
            if ((i >> k) & 1)
              if (g[j | (1 << t) | (1 << k)][t][k]) {
                int nxt = (i | j | (1 << t) | (1 << k));
                int v = f[i] + ppc[j | (1 << t) | (1 << k)] - (t != k);
                if (f[nxt] > v) {
                  f[nxt] = v;
                  bac[nxt][0] = t;
                  bac[nxt][1] = k;
                  bac[nxt][2] = (j | (1 << t) | (1 << k));
                  bac[nxt][3] = i;
                }
              }
  }
  printf("%d\n", f[(1 << n) - 1]);
  prt((1 << n) - 1);
  return 0;
}
