#include <bits/stdc++.h>

using namespace std;

const int maxn = 1e5 + 10;

int vis[maxn], dep[maxn];

vector<int> edge[maxn];
vector<pair<int, int> > ans;

bool dfs(int u, int pre)
{
    int s = 0;
    vis[u] = 1, dep[u] = dep[pre] + 1;
    for(auto v : edge[u])
    {
        if(!vis[v]) s ^= dfs(v, u);
        else if(dep[v] > dep[u])
        {
            ans.push_back({u, v});
            s ^= 1;
        }
    }
    if(s && pre) ans.push_back({u, pre});
    else if(pre) ans.push_back({pre, u});
    return s ^ 1;
}

int main()
{
    int n, m, u, v;
    scanf("%d%d", &n, &m);
    while(m --)
    {
        scanf("%d%d", &u, &v);
        edge[u].push_back(v);
        edge[v].push_back(u);
    }
    if(!dfs(1, 0)) return puts("-1"), 0;
    for(auto i : ans) printf("%d %d\n", i.first, i.second);
    return 0;
}
