//package ro.stancalau; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; /** * Created by Sorin on 4/29/2017. */ public class prog { static Map map = new HashMap<>(); static { // map.put(-1, ""); map.put(0, ""); map.put(1, "0"); map.put(2, "00"); map.put(3, "000"); map.put(4, "0000"); map.put(5, "00000"); map.put(6, "000000"); map.put(7, "0000000"); map.put(8, "00000000"); map.put(9, "000000000"); map.put(10, "0000000000"); map.put(11, "00000000000"); map.put(12, "000000000000"); map.put(13, "0000000000000"); map.put(14, "00000000000000"); } public static void main(final String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); List result = new LinkedList<>(); for (int i = 0; i < 1 << n; i++) result.add(i ^ i >> 1); List list = result.stream().map(x -> Integer.toBinaryString(x).toString()).collect(Collectors.toList()); StringBuilder sb = new StringBuilder(); for (String s : list) { sb.append(map.get(n - s.length())).append(s).append(System.lineSeparator()); } System.out.print(sb.toString()); } }