public static void main ( String [ ] args ) {
  int N = sc . nextInt ( ) ;
  long [ ] [ ] values = new long [ N ] [ 3 ] ;
  for ( int i = 0 ;
  i < N ;
  i ++ ) {
    values [ i ] = new long [ ] {
      nextLong ( ) , nextLong ( ) , nextLong ( ) };
    }
    String ans = null ;
    for ( int i = 0 ;
    i <= 100 ;
    i ++ ) {
      for ( int j = 0 ;
      j <= 100 ;
      j ++ ) {
        int [ ] centerPosi = new int [ ] {
          i , j };
          long H = 0 ;
          for ( int k = 0 ;
          k < N ;
          k ++ ) {
            long x = values [ k ] [ 0 ] ;
            long y = values [ k ] [ 1 ] ;
            long h = values [ k ] [ 2 ] ;
            if ( h != 0 ) {
              H = h + Math . abs ( centerPosi [ 0 ] - x ) + Math . abs ( centerPosi [ 1 ] - y ) ;
              break ;
            }
          }
          boolean isOK = true ;
          for ( int k = 0 ;
          k < N ;
          k ++ ) {
            long x = values [ k ] [ 0 ] ;
            long y = values [ k ] [ 1 ] ;
            long h = values [ k ] [ 2 ] ;
            long estimatedH = Math . max ( ( H - Math . abs ( x - centerPosi [ 0 ] ) - Math . abs ( y - centerPosi [ 1 ] ) ) , 0 ) ;
            isOK = isOK && ( estimatedH == h ) ;
          }
          if ( isOK ) {
            ans = i + " " + j + " " + H ;
          }
        }
      }
      System . out . println ( ans ) ;
    }
    
public static void main ( String [ ] args ) { int N = sc . nextInt ( ) ; long [ ] [ ] values = new long [ N ] [ 3 ] ; for ( int i = 0 ; i < N ; i ++ ) { values [ i ] = new long [ ] { nextLong ( ) , nextLong ( ) , nextLong ( ) } ; } String ans = null ; for ( int i = 0 ; i <= 100 ; i ++ ) { for ( int j = 0 ; j <= 100 ; j ++ ) { int [ ] centerPosi = new int [ ] { i , j } ; long H = 0 ; for ( int k = 0 ; k < N ; k ++ ) { long x = values [ k ] [ 0 ] ; long y = values [ k ] [ 1 ] ; long h = values [ k ] [ 2 ] ; if ( h != 0 ) { H = h + Math . abs ( centerPosi [ 0 ] - x ) + Math . abs ( centerPosi [ 1 ] - y ) ; break ; } } boolean isOK = true ; for ( int k = 0 ; k < N ; k ++ ) { long x = values [ k ] [ 0 ] ; long y = values [ k ] [ 1 ] ; long h = values [ k ] [ 2 ] ; long estimatedH = Math . max ( ( H - Math . abs ( x - centerPosi [ 0 ] ) - Math . abs ( y - centerPosi [ 1 ] ) ) , 0 ) ; isOK = isOK && ( estimatedH == h ) ; } if ( isOK ) { ans = i + " ▁ " + j + " ▁ " + H ; } } } System . out . println ( ans ) ; }
(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: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (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: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (array_creation_expression type: (integral_type) dimensions: (dimensions) value: (array_initializer (method_invocation name: (identifier) arguments: (argument_list)) (method_invocation name: (identifier) arguments: (argument_list)) (method_invocation name: (identifier) arguments: (argument_list)))))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (null_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 (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 (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions) value: (array_initializer (identifier) (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (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: (identifier)) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (array_access array: (array_access array: (identifier) index: (identifier)) index: (decimal_integer_literal)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (array_access array: (array_access array: (identifier) index: (identifier)) index: (decimal_integer_literal)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (array_access array: (array_access array: (identifier) index: (identifier)) index: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (identifier))))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (identifier))))))) (break_statement))))) (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (true))) (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 (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (array_access array: (array_access array: (identifier) index: (identifier)) index: (decimal_integer_literal)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (array_access array: (array_access array: (identifier) index: (identifier)) index: (decimal_integer_literal)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (array_access array: (array_access array: (identifier) index: (identifier)) index: (decimal_integer_literal)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (array_access array: (identifier) index: (decimal_integer_literal)))))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (array_access array: (identifier) index: (decimal_integer_literal))))))) (decimal_integer_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (string_literal)) right: (identifier)) right: (string_literal)) right: (identifier)))))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))