/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	private static Stack<Integer> list = new Stack<Integer>();
	private static int n = 7;
	
	public static void main (String[] args) throws java.lang.Exception
	{
		findSequence(3,1);
	}
	private static void findSequence(int k, int value){
		if(k==0){
			System.out.println(list.toString());
			return;
		}
		
		for(int i = value; i <= n ; ++i){
			list.push(i);
			findSequence(k-1, i+1);
			list.pop();
		}
	}
}