public class Grille {
    public static void main(String[] args) {
        int size = Integer.parseInt(args[0]);

        for (int x = 0; x < size * 2 + 1; x++) {
            for (int y = 0; y < size; y++) {
                if (x % 2 == 0) System.out.print("+---");
                else System.out.print("|   ");
            }

            if (x % 2 == 0) System.out.println("+");
            else System.out.println("|");
        }
    }
}