Problem: A programming coach has n students to teach. We know that n is divisible by 3. Let's assume that all students are numbered from 1 to n, inclusive.

Before the university programming championship the coach wants to split all students into groups of three. For some pairs of students we know that they want to be on the same team. Besides, if the i-th student wants to be on the same team with the j-th one, then the j-th student wants to be on the same team with the i-th one. The coach wants the teams to show good results, so he wants the following condition to hold: if the i-th student wants to be on the same team with the j-th, then the i-th and the j-th students must be on the same team. Also, it is obvious that each student must be on exactly one team.

Help the coach and divide the teams the way he wants.

Input

The first line of the input contains integers n and m (3 ≤ n ≤ 48, <image>. Then follow m lines, each contains a pair of integers ai, bi (1 ≤ ai < bi ≤ n) — the pair ai, bi means that students with numbers ai and bi want to be on the same team.

It is guaranteed that n is divisible by 3. It is guaranteed that each pair ai, bi occurs in the input at most once.

Output

If the required division into teams doesn't exist, print number -1. Otherwise, print <image> lines. In each line print three integers xi, yi, zi (1 ≤ xi, yi, zi ≤ n) — the i-th team. 

If there are multiple answers, you are allowed to print any of them.

Examples

Input

3 0


Output

3 2 1 


Input

6 4
1 2
2 3
3 4
5 6


Output

-1


Input

3 3
1 2
2 3
1 3


Output

3 2 1 

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;

public class main_class
{
	static int maxn = 105;
	static List <Integer> edges[] = new ArrayList[maxn];
	static int answer[][] = new int[maxn][3];
	static boolean done[] = new boolean[maxn];
	static int amount[] = new int[maxn];
	
	public static void main(String[] args)
	{
		try
		{
			Scanner sc = new Scanner(System.in);
			//Scanner sc = new Scanner("C:\\TESTING\\input.txt");
			PrintWriter out = new PrintWriter(System.out);
			int n = sc.nextInt();
			int m = sc.nextInt();
			for (int j = 1; j <= n; j++)
				edges[j] = new ArrayList <Integer> (0);
			for (int j = 0; j < m; j++)
			{
				int t1 = sc.nextInt();
				int t2 = sc.nextInt();
				edges[t1].add(t2);
				edges[t2].add(t1);
			}
			for (int j = 1; j <= n; j++) if (edges[j].size() > 2)
			{
				out.println("-1");
				out.close();
				return;
			}
			//out.println("here");
			//out.flush();
			for (int step = 2; step >= 0; step--)
			{
				//out.println("step = " + step);
				//out.flush();
				for (int choice = 1; choice <= n; choice++) if ((!done[choice]) && (edges[choice].size() == step))
				{
					//out.println("processing " + choice);
					//out.flush();
					boolean f = false;
					for (int team = 1; team <= n / 3; team++) if (amount[team] + step + 1 <= 3)
					{
						//out.println("team " + team + " amount = " + amount[team]);
						//out.flush();
						for (int k = 0; k < step; k++)
						{
							int u = edges[choice].get(k);
							if (done[u])
							{
								out.println("-1");
								out.close();
								return;
							}
							answer[team][amount[team]] = u;
							amount[team]++;
							done[u] = true;
						}
						answer[team][amount[team]] = choice;
						amount[team]++;
						done[choice] = true;
						f = true;
						break;
					}
					if (!f)
					{
						out.println("-1");
						out.close();
						return;
					}
				}
			}
			for (int j = 1; j <= n / 3; j++)
				out.println(answer[j][0] + " " + answer[j][1] + " " + answer[j][2]);
			out.close();
		}
		finally
		{
		}
	}
}