#include <bits/stdc++.h>
using namespace std;
const int N = 15;
vector<pair<int, int>> ans(N *N), cur, bb(N);
vector<int> g[N], dfn(N), low;
int n, m;
int dfs(int u, int fa) {
  int rb = low[u] = dfn[u] = ++m;
  random_shuffle(g[u].begin(), g[u].end());
  for (auto to : g[u])
    if (to != fa)
      if (!low[to]) {
        rb = min(rb, dfs(to, u));
        cur.emplace_back(u, to);
        if (low[u] > low[to]) low[u] = low[to], bb[u] = bb[to];
      } else if (low[u] > dfn[to])
        low[u] = dfn[to], bb[u] = {u, to};
  if (fa && rb == dfn[u]) cur.push_back(bb[u]), rb = low[u];
  return rb;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0, u, v; i < m; ++i)
    scanf("%d%d", &u, &v), g[u].push_back(v), g[v].push_back(u);
  for (auto t = clock() + 1926; clock() < t;) {
    cur.clear(), low.assign(n + 1, m = 0), dfs(rand() % n + 1, 0);
    if (ans.size() > cur.size()) ans = cur;
  }
  printf("%d\n", ans.size());
  for (auto it : ans) printf("%d %d\n", it.first, it.second);
}
