static String solve ( ) {
  int N = sc . nextInt ( ) ;
  String [ ] str = new String [ N ] ;
  for ( int i = 0 ;
  i < N ;
  ++ i ) {
    str [ i ] = sc . next ( ) ;
  }
  int [ ] [ ] count = new int [ N ] [ 101 ] ;
  int [ ] pos = new int [ N ] ;
  for ( int i = 0 ;
  pos [ 0 ] < str [ 0 ] . length ( ) ;
  ++ i ) {
    char c = str [ 0 ] . charAt ( pos [ 0 ] ) ;
    for ( int j = 0 ;
    j < N ;
    ++ j ) {
      if ( pos [ j ] >= str [ j ] . length ( ) || str [ j ] . charAt ( pos [ j ] ) != c ) {
        return "Fegla Won" ;
      }
      while ( pos [ j ] < str [ j ] . length ( ) && str [ j ] . charAt ( pos [ j ] ) == c ) {
        ++ pos [ j ] ;
        ++ count [ j ] [ i ] ;
      }
    }
  }
  for ( int i = 0 ;
  i < N ;
  ++ i ) {
    if ( pos [ i ] != str [ i ] . length ( ) ) {
      return "Fegla Won" ;
    }
  }
  int ans = 0 ;
  for ( int i = 0 ;
  count [ 0 ] [ i ] > 0 ;
  ++ i ) {
    int min = 1 << 30 ;
    for ( int j = 1 ;
    j <= 100 ;
    ++ j ) {
      int sum = 0 ;
      for ( int k = 0 ;
      k < N ;
      ++ k ) {
        sum += Math . abs ( count [ k ] [ i ] - j ) ;
      }
      min = Math . min ( min , sum ) ;
    }
    ans += min ;
  }
  return "" + ans ;
}

static String solve ( ) { int N = sc . nextInt ( ) ; String [ ] str = new String [ N ] ; for ( int i = 0 ; i < N ; ++ i ) { str [ i ] = sc . next ( ) ; } int [ ] [ ] count = new int [ N ] [ 101 ] ; int [ ] pos = new int [ N ] ; for ( int i = 0 ; pos [ 0 ] < str [ 0 ] . length ( ) ; ++ i ) { char c = str [ 0 ] . charAt ( pos [ 0 ] ) ; for ( int j = 0 ; j < N ; ++ j ) { if ( pos [ j ] >= str [ j ] . length ( ) || str [ j ] . charAt ( pos [ j ] ) != c ) { return " Fegla ▁ Won " ; } while ( pos [ j ] < str [ j ] . length ( ) && str [ j ] . charAt ( pos [ j ] ) == c ) { ++ pos [ j ] ; ++ count [ j ] [ i ] ; } } } for ( int i = 0 ; i < N ; ++ i ) { if ( pos [ i ] != str [ i ] . length ( ) ) { return " Fegla ▁ Won " ; } } int ans = 0 ; for ( int i = 0 ; count [ 0 ] [ i ] > 0 ; ++ i ) { int min = 1 << 30 ; for ( int j = 1 ; j <= 100 ; ++ j ) { int sum = 0 ; for ( int k = 0 ; k < N ; ++ k ) { sum += Math . abs ( count [ k ] [ i ] - j ) ; } min = Math . min ( min , sum ) ; } ans += min ; } return " " + ans ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters) 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 (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 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))))) (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))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (method_invocation object: (array_access array: (identifier) index: (decimal_integer_literal)) name: (identifier) arguments: (argument_list))) update: (update_expression (identifier)) body: (block (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 (array_access array: (identifier) index: (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 (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (array_access array: (identifier) index: (identifier)) name: (identifier) arguments: (argument_list))) right: (binary_expression left: (method_invocation object: (array_access array: (identifier) index: (identifier)) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier)))) right: (identifier)))) consequence: (block (return_statement (string_literal)))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (array_access array: (identifier) index: (identifier)) name: (identifier) arguments: (argument_list))) right: (binary_expression left: (method_invocation object: (array_access array: (identifier) index: (identifier)) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier)))) right: (identifier)))) body: (block (expression_statement (update_expression (array_access array: (identifier) index: (identifier)))) (expression_statement (update_expression (array_access array: (array_access array: (identifier) index: (identifier)) index: (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 (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (array_access array: (identifier) index: (identifier)) name: (identifier) arguments: (argument_list)))) consequence: (block (return_statement (string_literal)))))) (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: (array_access array: (array_access array: (identifier) index: (decimal_integer_literal)) index: (identifier)) right: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (decimal_integer_literal) right: (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 (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 (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (identifier)))))))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (return_statement (binary_expression left: (string_literal) right: (identifier)))))