Problem: You are given a simple connected undirected graph with N vertices and M edges. The vertices are numbered 1 to N, and the i-th edge connects Vertex A_i and Vertex B_i. Takahashi will assign one of the two possible directions to each of the edges in the graph to make a directed graph. Determine if it is possible to make a directed graph with an even number of edges going out from every vertex. If the answer is yes, construct one such graph.

Constraints

* 2 \leq N \leq 10^5
* N-1 \leq M \leq 10^5
* 1 \leq A_i,B_i \leq N (1\leq i\leq M)
* The given graph is simple and connected.

Input

Input is given from Standard Input in the following format:


N M
A_1 B_1
:
A_M B_M


Output

If it is impossible to assign directions to satisfy the requirement, print -1. Otherwise, print an assignment of directions that satisfies the requirement, in the following format:


C_1 D_1
:
C_M D_M


Here each pair (C_i, D_i) means that there is an edge directed from Vertex C_i to Vertex D_i. The edges may be printed in any order.

Examples

Input

4 4
1 2
2 3
3 4
4 1


Output

1 2
1 4
3 2
3 4


Input

5 5
1 2
2 3
3 4
2 5
4 5


Output

-1

Solution (in JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class Main {
	
	public static void main(String[] args) throws IOException {
		MyScanner sc = new MyScanner();
		PrintWriter out = new PrintWriter(System.out);
		int N = sc.nextInt();
		int M = sc.nextInt();
		Set<Integer>[] edges = new Set[N];
		for (int i = 0; i < N; i++) {
			edges[i] = new HashSet<>();
		}
		for (int i = 0; i < M; i++) {
			int a = sc.nextInt() - 1;
			int b = sc.nextInt() - 1;
			edges[a].add(b);
			edges[b].add(a);
		}
		TreeSet<Node> nodes = new TreeSet<>();
		for (int i = 0; i < N; i++) {
			nodes.add(new Node(edges[i].size(), i));
		}
		int ans = -1;
		if (M % 2 == 0) {
			boolean[] need = new boolean[N];
			while (!nodes.isEmpty()) {
				Node cur = nodes.first();
				int me = cur.index;
				int from = me, to = edges[me].iterator().next();
				if (cur.degre == 1) {
					if (!need[me]) {
						int tmp = from;
						from = to;
						to = tmp;
					}
				}
				need[from] = !need[from];
				out.println((from + 1) + " " + (to + 1));
				edges[from].remove(to);
				edges[to].remove(from);
				nodes.remove(new Node(edges[from].size() + 1, from));
				nodes.remove(new Node(edges[to].size() + 1, to));
				if (!edges[from].isEmpty()) {
					nodes.add(new Node(edges[from].size(), from));
				}
				if (!edges[to].isEmpty()) {
					nodes.add(new Node(edges[to].size(), to));
				}
			}
		} else {
			out.println(ans);
		}
		
		out.flush();
	}
	
	static class Node implements Comparable<Node> {
		int degre, index;
		
		public Node(int degre, int index) {
			this.degre = degre;
			this.index = index;
		}
		
		@Override
		public int compareTo(Node o) {
			int cmp = Integer.compare(degre, o.degre);
			if (cmp != 0) return cmp;
			return Integer.compare(index, o.index);
		}
	}
	
	
	static class MyScanner {
		private BufferedReader br;
		private StringTokenizer tokenizer;
		
		public MyScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
		
		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}
		
		public int nextInt() {
			return Integer.parseInt(next());
		}
		
		public long nextLong() {
			return Long.parseLong(next());
		}
	}
}