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.IOException;
import java.util.HashSet;
import java.util.Scanner;




public class Tree{
    
    class Node{
        int element;
        boolean flag;
        
        public Node(int element, boolean flag) {
            // TODO Auto-generated constructor stub
            this.element=element;
            this.flag=flag;
            
        }
    }

    public static HashSet<Integer> printSets(Node[][] arr,int start){
        HashSet<Integer> hashSet=new HashSet<Integer>();
        hashSet.add(arr[start][0].element);
        hashSet.add(arr[start][1].element);
        for(int i=start+1;i<arr.length;i++){
            if(hashSet.contains(arr[i][0].element) || hashSet.contains(arr[i][1].element) ){
                hashSet.add(arr[i][0].element);
                hashSet.add(arr[i][1].element);
                arr[i][0].flag=true;

            }
        }
        return(hashSet);
    }

    public static void main(String args[]) throws IOException {

        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt();
        int m=scan.nextInt();
        Node arr[][]=new Node[m][2];
        int signal[]=new int[n+1];
        int arr2[][]=new int[m][2];
        int final2[]=new int[n],z=0;
        int k=0;
        for(int i=1;i<=n;i++){
            signal[i]=1;
        }
            Tree tree=new Tree();
        for(int i=0;i<m;i++){
            arr[i][0]=tree.new Node(scan.nextInt(),false);
            arr[i][1]=tree.new Node(scan.nextInt(),false);
        }
        for(int i=0;i<m;i++){
            if(arr[i][0].flag==false){
                HashSet<Integer> hashSet=   printSets(arr,i);
                if(hashSet.size()>3){
                    System.out.println("-1");
                    scan.close();
                    return ;
                }
                if(hashSet.size()==3){
                    for(int x:hashSet){
                        signal[x]=hashSet.size();
                        final2[z]=x;z++;

                    }
                    System.out.println();
                }
                if(hashSet.size()==2){
                    int p=0;
                    for(int x:hashSet){
                        signal[x]=hashSet.size();
                        arr2[k][p]=x;p++;
                    }
                    k++;
                }
                
            }
        }       
        
        for(int i=0;i<k;i++){
            final2[z]=arr2[i][0];z++;
            final2[z]=arr2[i][1];z++;
            int j;
            for(j=1;j<=n;j++){
                if(signal[j]==1){
                    final2[z]=j;z++;
                    signal[j]=3;
                    break;
                }
            }
            if(j==n+1){
                System.out.println(-1);
                scan.close();
                return;
            }
        }
        
        for(int i=1;i<=n;i++){
            if(signal[i]==1){
                final2[z]=i;z++;
            
            }
        }
        for(int i=0;i<z;i++){
            System.out.print(final2[i]+" ");
            if((i+1)%3==0){
                System.out.println();
            }
        }
        scan.close();
    }
}