#include <iostream>
#include <vector>
#include <set>
#include <fstream>
const int maxn = 100 * 1000 + 5;
using namespace std;

int n, m;
vector<int> G[maxn];
set<int> a;
bool has = false;
int sr[maxn];

void back(int poz, int node) {
    
    sr[poz] = node;
    auto it = a.find(node);
    if(it != a.end())
        a.erase(it);

    if(poz == m) {
        has = true;
        return;
    }

    if(has) return;
    
    if(poz == m - 1) {
        bool ok = true;
        //cerr << "coa";
        for(auto e : G[node])
            if(e == 6)
                ok = false;

        if(ok)
            back(poz + 1, 6);
    }
 
    for(auto v : a) {
        bool ok = true;

        for(auto e : G[node])
            if(e == v)
                ok = false;

        if(!ok) continue;
        back(poz + 1, v);
        if(has) return;
    }
    
    a.insert(node);
}
bool mat[50][50];
int grad[500], l[500], r[500];

int main() {
    
    //ifstream cin("C.in");

    cin >> n >> m;

    for(int i = 1; i <= m; ++i) {
        int a, b; cin >> a >> b;
        G[a].push_back(b);
        G[b].push_back(a);
        if(n <= 10) {
            mat[a][b] = true, mat[b][a] = true;
        }
    }
    
    for(int i = 1; i <= n; ++i)
        a.insert(i);
    
    if(n > 7) {
        back(0, 6);
    
        for(int i = 0; i < m; ++i) {
            if(sr[i + 1] == n + 1)
                sr[i + 1] = 1;
            cout << sr[i] << " " << sr[i + 1] << "\n";
        }
        return 0;
    } else {
        int cnt = 0;

        for(int i = 1; i <= n; ++i)
            for(int j = i + 1; j <= n; ++j)
                if(mat[i][j] == false) {
                    l[++cnt] = i;
                    r[cnt] = j;
                }
    
        for(int i = 0; i < (1 << cnt); ++i) {
            
            int edges = 0;
            for(int j = 0; j < n; ++j)
                grad[j + 1] = 0;

            for(int j = 0; j < cnt; ++j)
                if(i & (1 << j)) {
                    grad[l[j + 1]]++;
                    grad[r[j + 1]]++;
                    edges++;
                }

            bool ok = true;
            for(int j = 0; j < n; ++j)
                if(grad[j + 1] > 2)
                    ok = false;
            //cerr << edges << " " <<  ok << "\n";

            if(ok && edges == m) {
                //cerr << "hai\n";
                for(int j = 0; j < cnt; ++j)
                    if(i & (1 << j))
                        cout << l[j + 1]<< " " << r[j + 1] << "\n";
                return 0;
            }
        }
    }
    
    cout << "-1\n";
    return 0;
}