#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5;
int n, m;
vector<int> g[maxn];
int cntcc, ccid[maxn], size[maxn];
vector<int> g2[maxn];
int ord[maxn], cnt;
int a[maxn], cnta;
int b[maxn], cntb;
int ord2[maxn], cnt2;
bool mat[20][20];
int ord0[maxn], cnt0;
bool vis[maxn];
void Fill(int u) {
  ccid[u] = cntcc;
  ++size[cntcc];
  for (int v : g[u]) {
    if (ccid[v] < 0) {
      Fill(v);
    }
  }
}
void Find(void) {
  memset(ccid, -1, sizeof ccid);
  for (int i = 0; i < n; ++i) {
    if (ccid[i] < 0) {
      Fill(i);
      ++cntcc;
    }
  }
}
void DfsOrd(int u, int p = -1) {
  ord2[cnt2++] = u;
  for (int v : g2[u]) {
    if (v != p) {
      DfsOrd(v, u);
    }
  }
}
void DfsOrd0(int u) {
  vis[u] = true;
  ord0[cnt0++] = u;
  for (int v : g[u]) {
    if (!vis[v]) {
      DfsOrd0(v);
    }
  }
}
pair<int, int> point[maxn];
int Far(int u) {
  queue<int> q;
  q.push(u);
  while (!q.empty()) {
    u = q.front();
    q.pop();
    for (int v : g[u]) {
      if (!vis[v]) {
        vis[v] = true;
        q.push(v);
      }
    }
  }
  memset(vis, 0, sizeof vis);
  return u;
}
int main(void) {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    --u;
    --v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  Find();
  int maxsize = 0, maxid = -1;
  for (int i = 0; i < cntcc; ++i) {
    if (size[i] > maxsize) {
      maxsize = size[i];
      maxid = i;
    }
  }
  if (maxsize << 1 < n) {
    for (int i = 0; i < n; ++i) {
      point[i] = {ccid[i], i};
    }
    sort(point, point + n);
    for (int i = 0; i < m; ++i) {
      printf("%d %d\n", point[i].second + 1,
             point[(i + maxsize) % n].second + 1);
    }
    return 0;
  } else if (maxsize << 1 == n) {
    for (int i = 0; i < n; ++i) {
      if (ccid[i] == maxid) {
        a[cnta++] = i;
      } else {
        b[cntb++] = i;
      }
    }
    for (int i = 0; i < n >> 1; ++i) {
      ord[cnt++] = a[i];
      ord[cnt++] = b[i];
    }
    for (int i = 0; i < m; ++i) {
      printf("%d %d\n", ord[i] + 1, ord[(i + 1) % n] + 1);
    }
    return 0;
  } else if (maxsize >= 5) {
    g2[0].push_back(maxsize - 3);
    g2[maxsize - 3].push_back(0);
    g2[maxsize - 1].push_back(1);
    g2[maxsize - 1].push_back(2);
    g2[1].push_back(maxsize - 1);
    g2[2].push_back(maxsize - 1);
    for (int i = 1; i < maxsize - 4; i += 2) {
      g2[i].push_back(i + 2);
      g2[i + 1].push_back(i + 3);
      g2[i + 2].push_back(i);
      g2[i + 3].push_back(i + 1);
    }
    if (maxsize & 1) {
      g2[maxsize - 4].push_back(maxsize - 2);
      g2[maxsize - 2].push_back(maxsize - 4);
    }
    DfsOrd(0, -1);
    for (int i = 0; i < n; ++i) {
      if (ccid[i] == maxid) {
        a[cnta++] = i;
      } else {
        b[cntb++] = i;
      }
    }
    DfsOrd0(Far(a[0]));
    for (int i = 0; i < maxsize; ++i) {
      ord[cnt++] = ord0[ord2[i]];
      if (i < cntb) {
        ord[cnt++] = b[i];
      }
    }
  } else {
    for (int i = 0; i < n; ++i) {
      ord[i] = i;
    }
    for (int i = 0; i < n; ++i) {
      for (int j : g[i]) {
        mat[i][j] = true;
      }
    }
    do {
      int cnt = 0;
      for (int i = 0; i < n; ++i) {
        if (!mat[ord[i]][ord[(i + 1) % n]]) {
          ++cnt;
        }
      }
      if (cnt >= m) {
        cnt = 0;
        for (int i = 0; i < n; ++i) {
          if (!mat[ord[i]][ord[(i + 1) % n]]) {
            printf("%d %d\n", ord[i] + 1, ord[(i + 1) % n] + 1);
            if (++cnt == m) {
              break;
            }
          }
        }
        return 0;
      }
    } while (next_permutation(ord, ord + n));
    puts("-1");
    return 0;
  }
  for (int i = 0; i < m; ++i) {
    int i1 = i + 1 == n ? 0 : i + 1;
    printf("%d %d\n", ord[i] + 1, ord[i1] + 1);
  }
  return 0;
}
