#include <iostream>
#include<bits/stdc++.h>
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
#define pii std::pair<int,int>
#define pli std::pair<ll,int>
#define pil std::pair<int,ll>
#define psi std::pair<string,int>
#define pll std::pair<ll,ll>
#define pci std::pair<char,int>
#define sll(x) scanf("%lld",&x)
#define prll(x) printf("%lld ",x)
#define pri(x) printf("%d ",x)
#define si(x) scanf("%d",&x)
#define pb push_back
#define vll std::vector<ll>
#define vpi std::vector<std::pair<int,int>>
#define vi std::vector<int>
#define vvi std::vector<std::vector<int>>
#define vvpil std::vector<std::vector<std::pair<int,ll>>>
#define vlpii std::vector<std::list<pii>>
#define vlpil std::vector<std::list<pil>>
#define li std::list<int>
#define lpil std::list<pil>
#define Endl printf("\n")
#define vli vector<list<int>>
#define vvll vector<vector<ll>>
#define mp make_pair
#define x first
#define y second
#define ma 100000000
#define imie(...) "[" << #__VA_ARGS__": " << (__VA_ARGS__) << "] "
const ll  INF=10000000000000;
const ll mod = 1e9 + 7;
using namespace std;
void add(int& a , int b){
	a += b;
	if(a >= mod) a -= mod;
}
ll mul(ll a , ll b){
	return (a * b) % mod;
}
vector<int> parent ; vi ran;

void make_set(int v) {
    parent[v] = v;
    ran[v] = 0;
}

int find_set(int v) {
    if (v == parent[v])
        return v;
    return parent[v] = find_set(parent[v]);
}

void union_sets(int a, int b) {
    a = find_set(a);
    b = find_set(b);
    if (a != b) {
        if (ran[a] < ran[b])
            swap(a, b);
        parent[b] = a;
        if (ran[a] == ran[b])
            ran[a]++;
    }
}

struct Edge {
    int u, v, weight;
    bool operator<(Edge const& other) {
        return weight < other.weight;
    }
};
vector<pii> ans  ;
vi deg ; 
vector<vi> ad ;
int n ;
vector<bool> visited ;
vector<Edge>MST(vector<Edge> edges){
	
	int cost = 0;
	vector<Edge> result;
	for (int i = 0; i < n; i++)
		make_set(i);
	sort(edges.begin(), edges.end());
	for (Edge e : edges) {
		if (find_set(e.u) != find_set(e.v)) {
			cost += e.weight;
			result.push_back(e);
			union_sets(e.u, e.v);
		}
		else {ans.pb(mp(e.u , e.v)) ;deg[e.u]++ ;}
	}
	return result ;
}
void dfs(int u){
	visited[u] = true ;
	vi tmp ;
	for(int x : ad[u]){
		if(!visited[x]) dfs(x) ;
		else tmp.pb(x) ;
	}
	if((deg[u] + tmp.size()) % 2 == 0){
		for(int x : tmp){
			ans.pb(mp(u , x)) ;
		}
	}
	else{
		int x1 = -1 ;
		for(int x : tmp){
			ans.pb(mp(x , u)) ;
			deg[x]++ ;
			x1 = x ;
			break ;
		}
		for(int x : tmp){
			if(x != x1){
				ans.pb(mp(u , x)) ;
			}
		}
	}
}
int main(){
	IOS;
	int m ; cin >> n >> m ;
	int u , v ;
	parent.resize(n) ;
	ran.resize(n) ;
	deg.resize(n , 0) ;
	vector<Edge> adj(m) ;
	ad.resize(n) ;
	visited.resize(n , false) ;
	for(int i = 0 ;  i < m  ; i++){
		cin >> u >> v  ;
		u-- ; v-- ;
		adj[i].u = u ;
		adj[i].v = v ;
		adj[i].weight = 0;
	}
	if(m % 2) return cout << -1 << "\n" , 0 ;
	vector<Edge> graph = MST(adj) ;
	for(int i = 0 ; i < (int)graph.size() ; i++){
		ad[graph[i].u].pb(graph[i].v) ;
		ad[graph[i].v].pb(graph[i].u) ;
	}
	dfs(0) ;
	for(int i = 0 ; i < m ; i++) cout << ans[i].x  + 1 << " " << ans[i].y + 1  << "\n" ;
	return 0;
}


Measured memory_bytes: 23392