import sys
import math

sys.setrecursionlimit(10**6)



def put_que(n):
    global tmp, tree
    if n in tmp:
        return
    que.append(n)
    tmp.add(n)
    for i in tree[n]:
        put_que(i)


def set_answer(n, i):
    global tree, answer
    # print(n, '-',i, tree[n])
    answer.append('{} {}'.format(n, i))
    tree[i].remove(n)

def search(n):
    global tree, que, answer

    if len(tree[n]) & 1:
        i = tree[n].pop()
        answer.append('{} {}'.format(i, n))
        tree[i].remove(n)

        j = tree[i].pop()
        answer.append('{} {}'.format(i, j))
        tree[j].remove(i)
    
    while len(tree[n]) > 0:
        i = tree[n].pop()
        answer.append('{} {}'.format(n, i))
        tree[i].remove(n)

def main():
    global tree, que, answer

    N, m = list(map(int, input().split()))
    tree = {i+1 : set() for i in range(N)}

    for _ in range(m):
        i, j = list(map(int, input().split()))
        tree[i].add(j)
        tree[j].add(i)

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

    # print(tree)
    put_que(1)
    for n in reversed(que):
        search(n)
            
    print(*answer, sep="\n")


if __name__ == "__main__":
    tmp = set()
    que = []
    answer = []
    main()

