#include <bits/stdc++.h>
using namespace std;
const int maxn = 101010;
int adj[maxn][2];
int adjN[maxn];
int N, M;
int main() {
  scanf("%d %d", &N, &M);
  memset(adjN, 0, sizeof(adjN));
  for (int i = 1; i <= M; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    adj[u][adjN[u]++] = v;
    adj[v][adjN[v]++] = u;
  }
  vector<int> V;
  for (int i = 1; i <= N; i++) {
    V.push_back(i);
  }
  for (int i = 0; i < 1024; i++) {
    random_shuffle(V.begin(), V.end());
    bool flag = true;
    for (int j = 0; flag && j < M; j++) {
      int v1 = V[j];
      int v2 = V[(j + 1) % N];
      if (adj[v1][0] == v2 || adj[v1][1] == v2) {
        flag = false;
      }
    }
    if (flag) {
      for (int j = 0; j < M; j++) {
        printf("%d %d\n", V[j], V[(j + 1) % N]);
      }
      return 0;
    }
  }
  printf("-1\n");
  return 0;
}
