#include <bits/stdc++.h>
const double pi = acos(-1);
const int MOD = 1e9 + 7;
const int INF = 1e9 + 7;
const int MAXN = 1e6 + 5;
const double eps = 1e-9;
using namespace std;
set<int> adj[MAXN];
int a[MAXN];
int main() {
  int n, m;
  scanf("%d", &(n)), scanf("%d", &(m));
  for (int i = 0; i < m; i++) {
    int u, v;
    scanf("%d", &(u)), scanf("%d", &(v));
    u--, v--;
    adj[u].insert(v);
    adj[v].insert(u);
  }
  for (int j = 0; j < 200; j++) {
    for (int i = 0; i < n; i++) a[i] = i;
    random_shuffle(a, a + n);
    a[n] = a[0];
    int fl = 0;
    for (int i = 0; i < m; i++)
      if (adj[a[i]].find(a[i + 1]) != adj[a[i]].end()) {
        fl = 1;
        break;
      }
    if (fl) continue;
    for (int i = 0; i < m; i++) printf("%d %d\n", a[i] + 1, a[i + 1] + 1);
    return 0;
  }
  printf("%d\n", (-1));
  return 0;
}
