#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr int kMaxN = 14;
constexpr int inf = 1e6;
bitset<kMaxN> edges[kMaxN];
int dp[1 << kMaxN];
int dp2[kMaxN][kMaxN][1 << kMaxN];
array<int, 3> p[1 << kMaxN];
int p2[kMaxN][kMaxN][1 << kMaxN];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      for (int mask = 0; mask < (1 << n); ++mask) {
        dp2[i][j][mask] = inf;
        p2[i][j][mask] = -1;
      }
    }
  }
  for (int i = 0; i < m; ++i) {
    int u, v;
    cin >> u >> v;
    --u, --v;
    edges[u][v] = true;
    edges[v][u] = true;
    dp2[u][v][0] = dp2[v][u][0] = 1;
    p2[u][v][0] = u;
    p2[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) {
        for (int z = 0; z < n; ++z) {
          if (!(mask & (1 << x)) && !(mask & (1 << y)) && edges[y][z] &&
              p2[x][y][mask] != z &&
              dp2[x][z][mask | (1 << y)] > dp2[x][y][mask] + 1) {
            dp2[x][z][mask | (1 << y)] = dp2[x][y][mask] + 1;
            p2[x][z][mask | (1 << y)] = y;
          }
        }
      }
    }
  }
  for (int i = 0; i < (1 << n); ++i) {
    dp[i] = inf;
  }
  dp[1] = 0;
  p[1] = {-1, -1, 0};
  for (int mask = 1; mask < (1 << n); ++mask) {
    for (int i = 0; i < n; ++i) {
      for (int j = i; j < n; ++j) {
        if (!(mask & (1 << i)) || !(mask & (1 << j))) {
          continue;
        }
        int other = ~mask & ((1 << n) - 1);
        for (int cur = other; cur; cur = (cur - 1) & other) {
          if (dp[mask | cur] > dp[mask] + dp2[i][j][cur]) {
            dp[mask | cur] = dp[mask] + dp2[i][j][cur];
            p[mask | cur] = {i, j, mask};
          }
        }
      }
    }
  }
  vector<pair<int, int>> chosen;
  int cur = (1 << n) - 1;
  while (cur != 1) {
    auto next = p[cur];
    int diff = cur ^ next[2];
    int x = next[0], z = next[1];
    while (diff) {
      int y = p2[x][z][diff];
      assert(y != z);
      chosen.emplace_back(min(y, z), max(y, z));
      assert(diff & (1 << y));
      diff ^= 1 << y;
      z = y;
    }
    assert(x != z);
    chosen.emplace_back(min(x, z), max(x, z));
    cur = next[2];
  }
  sort(chosen.begin(), chosen.end());
  chosen.resize(unique(chosen.begin(), chosen.end()) - chosen.begin());
  cout << chosen.size() << '\n';
  for (auto& e : chosen) {
    cout << e.first + 1 << ' ' << e.second + 1 << '\n';
  }
  assert(chosen.size() == dp[(1 << n) - 1]);
  return 0;
}
