#include <bits/stdc++.h>
using namespace std;

const int NMAX = 1e5 + 5;

int n, m;
int depth[NMAX];
vector <int> G[NMAX];
int curr[NMAX];

void dfs(int nod, int parent) {
    for (auto v: G[nod]) {
        if (v == parent)
            continue;

        if (depth[v]) {
            // muchie de intoarcere
            if (depth[v] < depth[nod]) {
                curr[nod] ^= 1;
                cout << nod << " " << v << "\n";
            }
        }
        else {
            depth[v] = depth[nod] + 1;
            dfs(v, nod);
        }
    }

    if (curr[nod])
        cout << nod << " " << parent << "\n", curr[nod] ^= 1;
    else if (parent > 0) {
        cout << parent << " " << nod << "\n", curr[parent] ^= 1;
    }
}

int main()
{
    cin >> n >> m;

    for (int i = 1; i <= m; i++) {
        int u, v;
        cin >> u >> v;
        G[u].push_back(v);
        G[v].push_back(u);
    }

    if (m % 2 == 1) {
        cout << -1;
        return 0;
    }


    depth[1] = 1;
    dfs(1, 0);

    return 0;
}
