#include <bits/stdc++.h>
#define NMAX (int)(1e5+4)
#define pb push_back
#define ft first
#define sd second
using namespace std;
typedef pair <int, int> pairINT;
typedef long long ll;

int n,m;
bool used[NMAX],odd[NMAX];
vector <int> g[NMAX];
vector <pairINT> sol;

void dfs(int);

int main(){
    int x,y;
    cin>>n>>m;
    for(int i=0;i<m;++i){
        cin>>x>>y;
        g[x].pb(y);
        g[y].pb(x);
    }
    if(m&1){
        cout<<-1;
        return 0;
    }
    dfs(1);
    for(auto it:sol)
        cout<<it.ft<<' '<<it.sd<<'\n';
    return 0;
}
void dfs(int node){
    vector <int> adj;
    used[node]=1;
    for(auto it:g[node])
        if(used[it])
            adj.push_back(it);
    for(auto it:g[node])
        if(!used[it])
            dfs(it);

    if(odd[node]){
        sol.pb({node, adj.back()});
        adj.pop_back();
    }
    for(auto it:adj)
        odd[it]^=1,
        sol.pb({it, node});
}
