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 PYTHON3):

Solution:
import sys
input = sys.stdin.readline


def main():
    N, M = map(int, input().split())
    graph = [[] for _ in range(N)]
    for _ in range(M):
        a, b = map(int, input().split())
        graph[a-1].append(b-1)
        graph[b-1].append(a-1)

    if M%2 == 1:
        print(-1)
        return

    q = [0]
    checked = [False]*N
    checked[0] = True
    search_seq = [0]
    while q:
        qq = []
        for p in q:
            for np in graph[p]:
                if not checked[np]:
                    checked[np] = True
                    qq.append(np)
                    search_seq.append(np)
        q = qq
    
    evenOrOdd = []
    for n in range(N):
        evenOrOdd.append(len(graph[n])%2)
    
    searched = [False]*N
    ans = []
    for p in reversed(search_seq):
        evens = []
        odds = []
        for np in graph[p]:
            if not searched[np]:
                if evenOrOdd[np]:
                    odds.append(np)
                else:
                    evens.append(np)
        if not odds and not evens:
            break

        if evenOrOdd[p] == 1:
            if odds:
                np = odds.pop()
                ans.append((np, p))
            else:
                np = evens.pop()
                ans.append((np, p))
        for np in odds:
            ans.append((p, np))
            evenOrOdd[np] = 0
        for np in evens:
            ans.append((p, np))
            evenOrOdd[np] = 1
            
        searched[p] = True
    
    for a1, a2 in ans:
        print(a1+1, a2+1)

    return            

        

if __name__ == "__main__":
    main()