import sys
N, M = map(int, input().split())
if M & 1:
    print(-1)
    sys.exit()
Edge = [[] for _ in range(N)]
Dim = [0]*N
for _ in range(M):
    a, b = map(int, sys.stdin.readline().split())
    a -= 1
    b -= 1
    Edge[a].append(b)
    Edge[b].append(a)
    Dim[a] += 1
    Dim[b] += 1
Edge1 = Edge[:]
Dim1 = Dim[:] 
Ans = []
used = set()
for i in sorted(range(N), key = lambda x: Dim[x]):
    Edge[i].sort(key = lambda x: Dim[x], reverse = True)
    while Dim[i] > 1:
        while (i, Edge[i][-1]) in used:
            Edge[i].pop()
        j1 = Edge[i].pop()
        while (i, Edge[i][-1]) in used:
            Edge[i].pop()
        j2 = Edge[i].pop()
        Ans.append((i+1, j1+1))
        Ans.append((i+1, j2+1))
        Dim[i] -= 2
        Dim[j1] -= 1
        Dim[j2] -= 1
        used.add((i, j1))
        used.add((i, j2))
        used.add((j1, i))
        used.add((j2, i))
if not len(Ans) == M:
    Edge = Edge1[:]
    Dim = Dim1[:]
    Ans = []
    used = set()
    for i in sorted(range(N), key = lambda x: Dim[x]):
        Edge[i].sort(key = lambda x: Dim[x], reverse = True)
    while Dim[i] > 1:
        while (i, Edge[i][-1]) in used:
            Edge[i].pop()
        j1 = Edge[i].pop()
        while (i, Edge[i][-1]) in used:
            Edge[i].pop()
        j2 = Edge[i].pop()
        Ans.append((i+1, j1+1))
        Ans.append((i+1, j2+1))
        Dim[i] -= 2
        Dim[j1] -= 1
        Dim[j2] -= 1
        used.add((i, j1))
        used.add((i, j2))
        used.add((j1, i))
        used.add((j2, i))

for a in Ans:
    print(*a)       