#include <bits/stdc++.h>
using namespace std;
int n, m, dp[20010], ct[20010], a[20010], b[20010], c[20010];
bool f[20][20][20010];
vector<int> edge[20];
vector<pair<int, int> > ans;
void dfs(int u, int zt, int st) {
  if (u == st && zt) return;
  for (int i = 0; i < edge[u].size(); i++) {
    int v = edge[u][i];
    if ((1 << (v - 1)) & zt) continue;
    if (ct[zt] == 1 && v == st) continue;
    if (f[st][v][zt]) continue;
    f[st][v][zt] = 1;
    dfs(v, (1 << (v - 1)) | zt, st);
  }
}
void find(int u, int v, int w) {
  if (!w) {
    ans.push_back(make_pair(u, v));
    return;
  }
  for (int i = 0, ii = edge[u].size(); i < ii; i++) {
    int vt = edge[u][i];
    if (!((1 << (vt - 1)) & w)) continue;
    if (!f[vt][v][(1 << (vt - 1)) ^ w]) continue;
    ans.push_back(make_pair(u, vt));
    find(vt, v, w ^ (1 << (vt - 1)));
    return;
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    edge[u].push_back(v);
    edge[v].push_back(u);
  }
  for (int i = 1; i < (1 << n); i++) ct[i] = ct[i ^ (i & (-i))] + 1;
  for (int i = 1; i <= n; i++) dfs(i, 0, i);
  memset(dp, 0x3f, sizeof(dp));
  for (int i = 0; i < n; i++) dp[1 << i] = 0;
  for (int i = 1; i < 1 << n; i++)
    for (int p = 1; p <= n; p++) {
      if (!((1 << (p - 1)) & i)) continue;
      for (int q = p; q <= n; q++) {
        if (!((1 << (q - 1)) & i)) continue;
        int t = ((1 << n) - 1) ^ i;
        for (int j = t; j; j = (j - 1) & t)
          if (f[p][q][j] && dp[i] + ct[j] + 1 < dp[i | j]) {
            dp[i | j] = dp[i] + ct[j] + 1;
            a[i | j] = p, b[i | j] = q, c[i | j] = j;
          }
      }
    }
  for (int i = (1 << n) - 1; ct[i] > 1; i = i ^ c[i]) find(a[i], b[i], c[i]);
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); i++)
    printf("%d %d\n", ans[i].first, ans[i].second);
}
