#include <bits/stdc++.h>
using namespace std;
const int maxx = 1e5 + 7;
int a[maxx], E = 10000;
bool flag;
map<pair<int, int>, int> mp;
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    mp[{v, u}] = 1;
    mp[{u, v}] = 1;
  }
  for (int i = 0; i < n; i++) a[i] = i;
  while (E--) {
    random_shuffle(a, a + n);
    flag = true;
    for (int i = 0; i < m; i++)
      if (mp[{a[i], a[(i + 1) % n]}]) {
        flag = false;
        break;
      }
    if (!flag) continue;
    for (int i = 0; i < m; i++)
      cout << a[i] + 1 << " " << a[(i + 1) % n] + 1 << "\n";
    return 0;
  }
  cout << "-1"
       << "\n";
}
