public static void main ( String ... args ) {
  final Scanner sc = new Scanner ( System . in ) ;
  final int a = sc . nextInt ( ) ;
  final int b = sc . nextInt ( ) ;
  long max = ( long ) a * a - ( long ) b * b ;
  int p = 1 ;
  for ( int i = 1 ;
  i <= a ;
  i ++ ) {
    long ans = ( long ) ( a - i + 1 ) * ( a - i + 1 ) + i - 1 ;
    final int r = b % ( i + 1 ) ;
    ans -= ( long ) ( b / ( i + 1 ) ) * ( b / ( i + 1 ) ) * ( i + 1 - r ) + ( long ) ( b / ( i + 1 ) + 1 ) * ( b / ( i + 1 ) + 1 ) * r ;
    if ( ans > max ) {
      max = ans ;
      p = i ;
    }
  }
  System . out . println ( max ) ;
  final int r = b % ( p + 1 ) ;
  final int d = b / ( p + 1 ) ;
  final char [ ] cs = new char [ a + b ] ;
  for ( int i = 0 , j = 0 ;
  i <= p ;
  i ++ ) {
    if ( i < r ) for ( int k = 0 ;
    k <= d ;
    j ++ , k ++ ) cs [ j ] = 'x' ;
    else for ( int k = 0 ;
    k < d ;
    j ++ , k ++ ) cs [ j ] = 'x' ;
    if ( i == 0 ) for ( int k = 0 ;
    k <= a - p ;
    j ++ , k ++ ) cs [ j ] = 'o' ;
    else if ( i < p ) {
      cs [ j ++ ] = 'o' ;
    }
  }
  System . out . println ( cs ) ;
}

public static void main ( String ... args ) { final Scanner sc = new Scanner ( System . in ) ; final int a = sc . nextInt ( ) ; final int b = sc . nextInt ( ) ; long max = ( long ) a * a - ( long ) b * b ; int p = 1 ; for ( int i = 1 ; i <= a ; i ++ ) { long ans = ( long ) ( a - i + 1 ) * ( a - i + 1 ) + i - 1 ; final int r = b % ( i + 1 ) ; ans -= ( long ) ( b / ( i + 1 ) ) * ( b / ( i + 1 ) ) * ( i + 1 - r ) + ( long ) ( b / ( i + 1 ) + 1 ) * ( b / ( i + 1 ) + 1 ) * r ; if ( ans > max ) { max = ans ; p = i ; } } System . out . println ( max ) ; final int r = b % ( p + 1 ) ; final int d = b / ( p + 1 ) ; final char [ ] cs = new char [ a + b ] ; for ( int i = 0 , j = 0 ; i <= p ; i ++ ) { if ( i < r ) for ( int k = 0 ; k <= d ; j ++ , k ++ ) cs [ j ] = ' x ' ; else for ( int k = 0 ; k < d ; j ++ , k ++ ) cs [ j ] = ' x ' ; if ( i == 0 ) for ( int k = 0 ; k <= a - p ; j ++ , k ++ ) cs [ j ] = ' o ' ; else if ( i < p ) { cs [ j ++ ] = ' o ' ; } } System . out . println ( cs ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (spread_parameter (type_identifier) (variable_declarator name: (identifier)))) body: (block (local_variable_declaration (modifiers) type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))) (local_variable_declaration (modifiers) type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration (modifiers) type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (cast_expression type: (integral_type) value: (identifier)) right: (identifier)) right: (binary_expression left: (cast_expression type: (integral_type) value: (identifier)) right: (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: (binary_expression left: (binary_expression left: (binary_expression left: (cast_expression type: (integral_type) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)))) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)))) right: (identifier)) right: (decimal_integer_literal)))) (local_variable_declaration (modifiers) type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (binary_expression left: (cast_expression type: (integral_type) value: (parenthesized_expression (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))))) right: (parenthesized_expression (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))))) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (identifier)))) right: (binary_expression left: (binary_expression left: (cast_expression type: (integral_type) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (decimal_integer_literal)))) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (decimal_integer_literal)))) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier)))) (local_variable_declaration (modifiers) type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (local_variable_declaration (modifiers) type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (local_variable_declaration (modifiers) type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (binary_expression left: (identifier) right: (identifier)))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (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)) update: (update_expression (identifier)) body: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (character_literal)))) alternative: (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)) update: (update_expression (identifier)) body: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (character_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))) update: (update_expression (identifier)) update: (update_expression (identifier)) body: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (character_literal)))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (update_expression (identifier))) right: (character_literal)))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))