import java.util.Scanner; public class fraktaali3 { public static void main(String[] args) { Scanner in = new Scanner(System.in); int f = Integer.parseInt(in.nextLine()); in.close(); int layers = f - 1; int side = (int) Math.pow(2, layers); Boolean[] fractal = new Boolean[side * side]; for (int i = 0; i < fractal.length; i++) { fractal[i] = true; } for (int width = 2; width <= side; width *= 2) { for (int subdivisiony = 0; subdivisiony < side / width; subdivisiony++) { for (int subdivisionx = 0; subdivisionx < side / width; subdivisionx++) { for (int y = width * subdivisiony + width / 2; y < width * (subdivisiony + 1); y++) { for (int x = width * subdivisionx + width / 2; x < width * (subdivisionx + 1); x++) { fractal[y * side + x] ^= true; } } } } } for (int y = 0; y < side; y++) { for (int x = 0; x < side; x++) { System.out.print(fractal[y * side + x] ? "#" : "."); } System.out.println(""); } } }