public static void process ( ) throws IOException {
  int m = ni ( ) ;
  String [ ] s = new String [ m ] ;
  for ( int i = 0 ;
  i < m ;
  i ++ ) {
    s [ i ] = nln ( ) ;
  }
  int n = s [ 0 ] . length ( ) ;
  int ans = ( m == 1 ) ? 0 : func ( m , n , s ) ;
  pn ( ans ) ;
}

public static void process ( ) throws IOException { int m = ni ( ) ; String [ ] s = new String [ m ] ; for ( int i = 0 ; i < m ; i ++ ) { s [ i ] = nln ( ) ; } int n = s [ 0 ] . length ( ) ; int ans = ( m == 1 ) ? 0 : func ( m , n , s ) ; pn ( ans ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters) (throws (type_identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation 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 (identifier))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation name: (identifier) arguments: (argument_list)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (array_access array: (identifier) index: (decimal_integer_literal)) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (ternary_expression condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (decimal_integer_literal) alternative: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier))))))