#include <bits/stdc++.h>
using namespace std;
bool home = 1;
signed realMain();
signed main() {
  home = 0;
  if (home) {
    freopen("input", "r", stdin);
  } else {
    ios::sync_with_stdio(0);
    cin.tie(0);
  }
  realMain();
}
const long long N = 14;
const long long INF = (long long)1e18;
long long n, m;
vector<long long> g[N];
long long bt[1 << N];
bool okay[N][N][1 << N];
long long lst[N][N][1 << N];
long long dp[1 << N], rl[1 << N];
struct T {
  long long x;
  long long y;
  long long m2;
};
T par[1 << N];
vector<long long> ret[N];
void p(long long mask) {
  for (long long i = 0; i < n; i++) {
    if (mask & (1 << i)) {
      cout << i << "\n";
    }
  }
}
void print(vector<pair<long long, long long>> v) {
  for (auto &x : v) {
    cout << ": " << x.first << " " << x.second << "\n";
  }
}
signed realMain() {
  for (long long i = 1; i < (1 << N); i++) {
    long long j = (i & (-i));
    bt[i] = 1 + bt[i - j];
  }
  cin >> n >> m;
  for (long long i = 1; i <= m; i++) {
    long long x, y;
    cin >> x >> y;
    x--;
    y--;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  for (long long start = 0; start < n; start++)
    for (long long u = 0; u < n; u++)
      for (long long mask = 0; mask < (1 << n); mask++)
        lst[start][u][mask] = -1;
  for (long long start = 0; start < n; start++) {
    okay[start][start][1 << start] = 1;
    lst[start][start][1 << start] = start;
    for (long long mask = 0; mask < (1 << n); mask++) {
      for (long long u = 0; u < n; u++) {
        if (!okay[start][u][mask]) continue;
        for (auto &nou : g[u]) {
          if (mask & (1 << nou)) continue;
          lst[start][nou][mask + (1 << nou)] = u;
          okay[start][nou][mask + (1 << nou)] = 1;
        }
      }
    }
  }
  for (long long start = 0; start < n; start++) {
    for (long long mask = 0; mask < (1 << n); mask++) {
      for (long long u = 0; u < n; u++) {
        if (okay[start][u][mask]) {
          for (auto &j : g[u]) {
            if (j == start && mask != (1 << u) + (1 << start))
              okay[start][start][mask] = 1, lst[start][start][mask] = u;
          }
        }
      }
    }
  }
  for (long long mask = 0; mask < (1 << n); mask++) {
    dp[mask] = INF;
  }
  for (long long i = 0; i < n; i++) {
    dp[1 << i] = 0;
  }
  for (long long mask = 0; mask < (1 << n); mask++) {
    vector<long long> in, out;
    for (long long i = 0; i < n; i++) {
      if (mask & (1 << i)) {
        in.push_back(i);
      } else {
        out.push_back(i);
      }
    }
    if (dp[mask] == INF) continue;
    long long cnt = (long long)out.size();
    rl[0] = 0;
    for (long long i = 0; i < cnt; i++) {
      rl[1 << i] = 1 << out[i];
    }
    for (auto &x : in) {
      for (auto &y : in) {
        for (long long mic = 1; mic < (1 << cnt); mic++) {
          long long uu = (mic & (-mic));
          rl[mic] = rl[uu] + rl[mic - uu];
          long long m2 = rl[mic] | (1 << x) | (1 << y);
          if (okay[x][y][m2]) {
            long long relax = dp[mask] + bt[m2] - (x != y);
            long long nmask = mask | m2;
            if (relax < dp[nmask]) {
              dp[nmask] = relax;
              par[nmask] = {x, y, m2};
            }
          }
        }
      }
    }
  }
  cout << dp[(1 << n) - 1] << "\n";
  vector<pair<long long, long long>> ret;
  long long mask = (1 << n) - 1;
  while (par[mask].m2) {
    auto it = par[mask];
    mask ^= it.m2;
    long long m2 = it.m2;
    long long x = it.x, y = it.y;
    mask |= (1 << x);
    mask |= (1 << y);
    if (x == y) {
      ret.push_back({lst[x][y][m2], y});
      y = lst[x][y][m2];
    }
    while (m2 > (1 << x)) {
      ret.push_back({lst[x][y][m2], y});
      long long next_y = lst[x][y][m2];
      m2 -= (1 << y);
      y = next_y;
    }
  }
  assert((long long)ret.size() == dp[(1 << n) - 1]);
  for (auto &x : ret) {
    cout << x.first + 1 << " " << x.second + 1 << "\n";
  }
  return 0;
}
