public static void main ( String [ ] args ) {
  int k = input . nextInt ( ) ;
  String [ ] bus = new String [ 34 ] ;
  for ( int i = 0 ;
  i < 34 ;
  i ++ ) {
    bus [ i ] = i < k ? "O" : "#" ;
  }
  System . out . println ( MessageFormat . format ( "+------------------------+\n" + "|{0}.{4}.{7}.{10}.{13}.{16}.{19}.{22}.{25}.{28}.{31}.|D|)\n" + "|{1}.{5}.{8}.{11}.{14}.{17}.{20}.{23}.{26}.{29}.{32}.|.|\n" + "|{2}.......................|\n" + "|{3}.{6}.{9}.{12}.{15}.{18}.{21}.{24}.{27}.{30}.{33}.|.|)\n" + "+------------------------+\n" , bus ) ) ;
}

public static void main ( String [ ] args ) { int k = input . nextInt ( ) ; String [ ] bus = new String [ 34 ] ; for ( int i = 0 ; i < 34 ; i ++ ) { bus [ i ] = i < k ? " O " : " # " ; } System . out . println ( MessageFormat . format ( " + - - - - - - - - - - - - - - - - - - - - - - - - + \n " + " | { 0 } . { 4 } . { 7 } . { 10 } . { 13 } . { 16 } . { 19 } . { 22 } . { 25 } . { 28 } . { 31 } . | D | ) \n " + " | { 1 } . { 5 } . { 8 } . { 11 } . { 14 } . { 17 } . { 20 } . { 23 } . { 26 } . { 29 } . { 32 } . | . | \n " + " | { 2 } . . . . . . . . . . . . . . . . . . . . . . . | \n " + " | { 3 } . { 6 } . { 9 } . { 12 } . { 15 } . { 18 } . { 21 } . { 24 } . { 27 } . { 30 } . { 33 } . | . | ) \n " + " + - - - - - - - - - - - - - - - - - - - - - - - - + \n " , bus ) ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (array_type element: (type_identifier) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (type_identifier) dimensions: (dimensions_expr (decimal_integer_literal))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (ternary_expression condition: (binary_expression left: (identifier) right: (identifier)) consequence: (string_literal) alternative: (string_literal)))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (string_literal) right: (string_literal)) right: (string_literal)) right: (string_literal)) right: (string_literal)) right: (string_literal)) (identifier))))))))