#include <bits/stdc++.h>
using namespace std;
const int maxn = 14;
const int maxmask = (1 << maxn);
const int oo = 1e9;
int n, m;
vector<int> adj[maxn];
int dp[maxn][maxn][maxmask];
int last[maxn][maxn][maxmask];
int dp1[maxmask];
pair<int, int> tr[maxmask];
int gg[maxmask];
int main() {
  cin >> n >> m;
  for (int i = (0); i < (m); i++) {
    int x, y;
    cin >> x >> y;
    x--;
    y--;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  for (int i = (0); i < (n); i++) {
    for (auto j : adj[i]) {
      dp[i][j][0] = 1;
      last[i][j][0] = i;
    }
  }
  for (int mask = (0); mask < ((1 << n)); mask++) {
    for (int i = (0); i < (n); i++) {
      for (int j = (0); j < (n); j++) {
        if ((mask & (1 << i)) || (mask & (1 << j)) || !dp[i][j][mask]) continue;
        for (auto v : adj[j]) {
          if ((mask & (1 << v)) || v == last[i][j][mask] || v == j) continue;
          int nmask = mask | (1 << j);
          dp[i][v][nmask] = 1;
          last[i][v][nmask] = j;
        }
      }
    }
  }
  for (int i = (0); i < ((1 << n)); i++) {
    dp1[i] = oo;
  }
  dp1[1] = 0;
  for (int mask = (2); mask < ((1 << n)); mask++) {
    for (int submask = mask; submask; submask = (submask - 1) & mask) {
      int lastmask = mask ^ submask;
      int cnt = __builtin_popcount(submask) + 1;
      int check = 0;
      for (int i = (0); i < (n); i++) {
        for (int j = (0); j < (n); j++) {
          if ((lastmask & (1 << i)) && (lastmask & (1 << j))) {
            if (!dp[i][j][submask]) continue;
            if (dp1[mask] > dp1[lastmask] + cnt) {
              dp1[mask] = dp1[lastmask] + cnt;
              tr[mask] = make_pair(i, j);
              gg[mask] = submask;
              check = 1;
              break;
            }
          }
        }
        if (check) break;
      }
    }
  }
  if (dp1[(1 << n) - 1] == oo) {
    cout << -1;
    return 0;
  }
  cout << dp1[(1 << n) - 1] << '\n';
  int cur = (1 << n) - 1;
  while (cur != 1) {
    auto now = tr[cur];
    int u = now.first;
    int mask = gg[cur];
    cur ^= mask;
    int v = now.second;
    while (u != last[u][v][mask]) {
      int tmp = last[u][v][mask];
      cout << v + 1 << ' ' << tmp + 1 << '\n';
      v = tmp;
      mask ^= (1 << v);
    }
    cout << u + 1 << ' ' << v + 1 << '\n';
  }
  return 0;
}
