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 
//package round181;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;

public class B2 {
	InputStream is;
	PrintWriter out;
	String INPUT = "";
	
	void solve()
	{
		int n = ni(), m = ni();
		DJSet ds = new DJSet(n);
		for(int i = 0;i < m;i++){
			int a = ni()-1, b = ni()-1;
			ds.union(a, b);
		}
		
		long[][] cls = new long[4][n];
		int[] cp = new int[4];
		for(int i = 0;i < n;i++){
			if(ds.upper[i] < 0){
				int ct = -ds.upper[i];
				if(ct >= 4){
					out.println(-1);
					return;
				}
				long t = 0;
				for(int j = 0;j < n;j++){
					if(ds.equiv(i, j)){
						t |= 1L<<j;
					}
				}
				cls[ct][cp[ct]++] = t;
			}
		}
		if(cp[2] > cp[1]){
			out.println(-1);
			return;
		}
		
		for(int i = 0;i < cp[3];i++){
			StringBuilder sb = new StringBuilder();
			for(int j = 0;j < n;j++){
				if(cls[3][i]<<63-j<0){
					sb.append(" " + (j+1));
				}
			}
			out.println(sb.substring(1));
		}
		
		for(int i = 0;i < cp[2];i++){
			StringBuilder sb = new StringBuilder();
			for(int j = 0;j < n;j++){
				if(cls[2][i]<<63-j<0){
					sb.append(" " + (j+1));
				}
			}
			for(int j = 0;j < n;j++){
				if(cls[1][i]<<63-j<0){
					sb.append(" " + (j+1));
				}
			}
			out.println(sb.substring(1));
		}
		for(int i = cp[2];i < cp[1];i+=3){
			StringBuilder sb = new StringBuilder();
			for(int j = 0;j < n;j++){
				if(cls[1][i]<<63-j<0){
					sb.append(" " + (j+1));
				}
			}
			for(int j = 0;j < n;j++){
				if(cls[1][i+1]<<63-j<0){
					sb.append(" " + (j+1));
				}
			}
			for(int j = 0;j < n;j++){
				if(cls[1][i+2]<<63-j<0){
					sb.append(" " + (j+1));
				}
			}
			out.println(sb.substring(1));
		}
	}
	
	public static class DJSet { public int[] upper; public DJSet(int n){ upper = new int[n]; Arrays.fill(upper, -1);} public int root(int x){	return upper[x] < 0 ? x : (upper[x] = root(upper[x]));}	public boolean equiv(int x, int y){ return root(x) == root(y);} public boolean union(int x, int y){ x = root(x);y = root(y);if(x != y) { if(upper[y] < upper[x]) { int d = x; x = y; y = d;	} upper[x] += upper[y]; upper[y] = x;} return x == y;} public int count(){ int ct = 0; for(int u : upper)if(u < 0)ct++; return ct; }}
	
	void run() throws Exception
	{
		is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);
		
		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis()-s+"ms");
	}
	
	public static void main(String[] args) throws Exception { new B2().run(); }
	
	private byte[] inbuf = new byte[1024];
	private int lenbuf = 0, ptrbuf = 0;
	
	private int readByte()
	{
		if(lenbuf == -1)throw new InputMismatchException();
		if(ptrbuf >= lenbuf){
			ptrbuf = 0;
			try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
			if(lenbuf <= 0)return -1;
		}
		return inbuf[ptrbuf++];
	}
	
	private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
	private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }
	
	private double nd() { return Double.parseDouble(ns()); }
	private char nc() { return (char)skip(); }
	
	private String ns()
	{
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}
	
	private char[] ns(int n)
	{
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while(p < n && !(isSpaceChar(b))){
			buf[p++] = (char)b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}
	
	private char[][] nm(int n, int m)
	{
		char[][] map = new char[n][];
		for(int i = 0;i < n;i++)map[i] = ns(m);
		return map;
	}
	
	private int[] na(int n)
	{
		int[] a = new int[n];
		for(int i = 0;i < n;i++)a[i] = ni();
		return a;
	}
	
	private int ni()
	{
		int num = 0, b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}
		
		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}
	
	private long nl()
	{
		long num = 0;
		int b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}
		
		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}
	
	private boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	private void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}
