#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
int n, m;
int a[N];
vector<int> g[N];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    g[u].push_back(v);
    g[v].push_back(u);
  }
  for (int i = 1; i <= n; i++) a[i] = i;
  for (int i = 0; i < 100; i++) {
    random_shuffle(a + 1, a + n + 1);
    bool ok = 1;
    for (int j = 1; j <= m; j++) {
      int t = (j == n ? a[1] : a[j + 1]);
      for (int k = 0; k < g[a[j]].size(); k++)
        if (g[a[j]][k] == t) {
          ok = 0;
          break;
        }
      if (!ok) break;
    }
    if (ok) {
      for (int j = 1; j <= m; j++) {
        int t = (j == n ? a[1] : a[j + 1]);
        printf("%d %d\n", a[j], t);
      }
      return 0;
    }
  }
  printf("-1");
  return 0;
}
