/* Author: Amay Agrawal
 * Project: Bacteria Cloud
 * Mentor: Prof. Manish K Gupta
 */
import java.util.Random;
public class RandomGenerator {
	public static void main(String [] args){
		int maximum =8;
		Random rand = new Random();
		for(int i=0;i<8;i++){
		int g = rand.nextInt((7 - 0) + 1) ;
		int f = rand.nextInt((7 - 0) + 1) ;
		while(true){
		if(f==g)
			f = rand.nextInt((7 - 0) + 1) ;
		else{
			break;
		}
		}
		int h = rand.nextInt((7 - 0) + 1) ;
		while(true){
		if(h==g || h==f)
			h = rand.nextInt((7 - 0) + 1);
		else 
			break;
		}
		System.out.println(g+" "+f+" "+h);
		}
	}
}
