#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
int N, M;
vector<int> g[15];
int DP[1 << 14];
bool can[14][14][1 << 14];
int lastv[14][14][1 << 14];
int pre[1 << 14];
array<int, 2> endpoint[1 << 14];
int main() {
  cin >> N >> M;
  for (int i = 1; i <= M; ++i) {
    int u, v;
    cin >> u >> v;
    --u, --v;
    g[v].push_back(u);
    g[u].push_back(v);
  }
  for (int mask = 0; mask < 1 << N; ++mask) {
    DP[mask] = INF;
  }
  for (int v = 0; v < N; ++v) {
    for (int u = 0; u < N; ++u) {
      for (int mask = 0; mask < 1 << N; ++mask) {
        can[v][u][mask] = 0;
      }
    }
  }
  for (int v = 0; v < N; ++v) {
    for (int u : g[v]) {
      can[v][u][0] = 1;
      lastv[v][u][0] = v;
    }
  }
  for (int mask = 0; mask < 1 << N; ++mask) {
    for (int x = 0; x < N; ++x) {
      for (int y = 0; y < N; ++y) {
        if (mask >> x & 1) continue;
        if (mask >> y & 1) continue;
        if (!can[x][y][mask]) continue;
        if (x == y) continue;
        for (int ny : g[y]) {
          if (mask >> ny & 1) continue;
          int nmask = mask | (1 << y);
          if (lastv[x][y][mask] == ny) continue;
          if (can[x][ny][nmask]) continue;
          can[x][ny][nmask] = 1;
          lastv[x][ny][nmask] = y;
        }
      }
    }
  }
  if (0)
    for (int x = 0; x < N; ++x) {
      for (int y = 0; y < N; ++y) {
        for (int mask = 0; mask < 1 << N; ++mask) {
          if (can[x][y][mask]) printf("good %d %d %d\n", x, y, mask);
        }
      }
    }
  DP[1] = 0;
  for (int mask = 0; mask < 1 << N; ++mask) {
    int cmask = ((1 << N) - 1) ^ mask;
    for (int addmask = cmask; addmask; addmask = (addmask - 1) & cmask) {
      int nedges = __builtin_popcount(addmask) + 1;
      int nmask = addmask | mask;
      if (DP[mask] + nedges >= DP[nmask]) continue;
      bool found = 0;
      for (int x = 0; x < N && !found; ++x) {
        for (int y = 0; y < N && !found; ++y) {
          if ((mask >> x & 1) && (mask >> y & 1)) {
            if (can[x][y][addmask]) {
              found = 1;
              DP[nmask] = DP[mask] + nedges;
              pre[nmask] = mask;
              endpoint[nmask] = {x, y};
            }
          }
        }
      }
    }
  }
  if (0)
    for (int mask = 0; mask < 1 << N; ++mask)
      printf("DP[%d] = %d\n", mask, DP[mask]);
  cout << DP[(1 << N) - 1] << endl;
  int mask = (1 << N) - 1;
  while (pre[mask]) {
    int cur = mask ^ pre[mask];
    int x = endpoint[mask][0], y = endpoint[mask][1];
    while (cur) {
      int ny = lastv[x][y][cur];
      cout << y + 1 << " " << ny + 1 << endl;
      cur ^= (1 << ny);
      y = ny;
    }
    cout << x + 1 << " " << y + 1 << endl;
    mask = pre[mask];
  }
}
