import java.io.*;
import java.util.*;
public class Main {
static int n ;
static Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
static boolean[] state = new boolean[50];
public static void dfs(int u) throws IOException
{
if(u>n) //leaves node
{
for (int i = 1; i <=n; i++) {
if(state[i]){
out.write(i+” “);
}
}
out.write("\n");
return;
}
state[u]=true ;
dfs(u+1);
state[u]=false ;
dfs(u+1);
}
public static void main(String[] args) throws IOException {
n = in.nextInt();
// System.out.println("\n");
dfs(1);
out.flush();
}
}``