#include <bits/stdc++.h>
using namespace std;
const int inf = 1000;
bool edge[14][14];
bool path[1 << 14][14][14];
int popcnt[1 << 14];
int dp[1 << 14];
tuple<int, int, int> trk[1 << 14];
int n, m;
inline bool On(int mask, int k) { return (mask >> k) & 1; }
vector<pair<int, int> > sol;
void solve(int mask) {
  if (get<0>(trk[mask]) == -1) {
    int st = get<1>(trk[mask]), en = get<2>(trk[mask]);
    sol.push_back({st, en});
    while (true) {
      if (popcnt[mask] == 2) {
        sol.push_back({st, en});
        return;
      }
      for (int w = 0; w < n; w++) {
        if (w != st && w != en && On(mask, w) &&
            path[mask ^ (1 << en)][st][w] && edge[w][en]) {
          sol.push_back({w, en});
          mask ^= (1 << en);
          en = w;
          break;
        }
      }
    }
    return;
  }
  int submask = get<0>(trk[mask]);
  int u = get<1>(trk[mask]), v = get<2>(trk[mask]);
  solve(mask ^ submask);
  while (true) {
    if (popcnt[submask] == 0) {
      sol.push_back({u, v});
      break;
    }
    for (int w = 0; w < n; w++) {
      if (!On(submask, w)) continue;
      if (path[submask | (1 << u)][u][w] && edge[w][v]) {
        sol.push_back({w, v});
        submask ^= (1 << w);
        v = w;
        break;
      }
    }
  }
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    u--, v--;
    edge[u][v] = edge[v][u] = 1;
  }
  for (int i = 1; i < (1 << n); i++) {
    popcnt[i] = popcnt[i - (i & -i)] + 1;
  }
  for (int mask = 1; mask < (1 << n); mask++) {
    for (int u = 0; u < n; u++) {
      if (!On(mask, u)) continue;
      for (int v = 0; v < n; v++) {
        if (!On(mask, v) or u == v) continue;
        if (popcnt[mask] == 2) {
          path[mask][u][v] = edge[u][v];
        } else {
          for (int w = 0; w < n; w++) {
            if (w != u && w != v && On(mask, w) &&
                path[mask ^ (1 << v)][u][w] && edge[w][v]) {
              path[mask][u][v] = 1;
            }
          }
        }
      }
    }
  }
  for (int mask = 1; mask < (1 << n); mask++) {
    dp[mask] = inf;
    trk[mask] = make_tuple(-1, -1, -1);
    if (popcnt[mask] < 3) continue;
    vector<int> nodes;
    for (int k = 0; k < n; k++) {
      if (On(mask, k)) nodes.push_back(k);
    }
    for (int u : nodes) {
      for (int v : nodes) {
        if (u != v) {
          if (path[mask][u][v] && edge[u][v]) {
            dp[mask] = popcnt[mask];
            trk[mask] = make_tuple(-1, u, v);
            break;
          }
        }
      }
    }
    for (int submask = mask; submask != 0; submask = (submask - 1) & mask) {
      for (int u : nodes) {
        if (On(submask, u)) continue;
        for (int v : nodes) {
          if (!On(submask, v) && path[submask | (1 << u) | (1 << v)][u][v] &&
              u != v) {
            int cur = dp[mask ^ submask] + popcnt[submask] + 1;
            if (cur < dp[mask]) {
              dp[mask] = cur;
              trk[mask] = make_tuple(submask, u, v);
            }
          }
          if (On(submask, v) && popcnt[submask] > 1 &&
              path[submask | (1 << u)][u][v] && edge[u][v]) {
            int cur = dp[mask ^ submask] + popcnt[submask] + 1;
            if (cur < dp[mask]) {
              dp[mask] = cur;
              trk[mask] = make_tuple(submask, u, u);
            }
          }
        }
      }
    }
  }
  cout << dp[(1 << n) - 1] << endl;
  solve((1 << n) - 1);
  for (int i = 0; i < sol.size(); i++) {
    cout << sol[i].first + 1 << " " << sol[i].second + 1 << endl;
  }
}
