#include <bits/stdc++.h>
using namespace std;
int n, m, x, y;
vector<int> v[100005], sf;
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= m; i++) {
    scanf("%d %d", &x, &y);
    v[x].push_back(y);
    v[y].push_back(x);
  }
  for (int i = 1; i <= n; i++) sf.push_back(i);
  for (int i = 1; i <= 1000000; i++) {
    random_shuffle(sf.begin(), sf.end());
    int ans = 0;
    bool salah = false;
    for (int j = 0; j < sf.size(); j++) {
      for (int k = 0; k < v[sf[j]].size(); k++)
        if (v[sf[j]][k] == sf[(j + 1) % n]) {
          salah = true;
          break;
        }
      if (!salah) ans++;
      if (salah || ans == m) break;
    }
    if (ans == m) {
      for (int j = 1; j <= m; j++) printf("%d %d\n", sf[j - 1], sf[j % n]);
      return 0;
    }
  }
  printf("-1\n");
  return 0;
}
