public static void main ( String [ ] args ) throws IOException {
  Scanner sc = new Scanner ( System . in ) ;
  int numTests = sc . nextInt ( ) ;
  for ( int test = 1 ;
  test <= numTests ;
  test ++ ) {
    int n = sc . nextInt ( ) ;
    String must = "" ;
    int [ ] [ ] q = new int [ 111 ] [ n ] ;
    for ( int i = 0 ;
    i < n ;
    i ++ ) {
      String s = sc . next ( ) + "?" ;
      String t = "" ;
      int ind = 0 ;
      char c = '?' ;
      int cnt = 1 ;
      for ( int j = 0 ;
      j < s . length ( ) ;
      j ++ ) {
        if ( s . charAt ( j ) == c ) cnt ++ ;
        else {
          t += c ;
          q [ ind ] [ i ] = cnt ;
          cnt = 0 ;
          ind ++ ;
          c = s . charAt ( j ) ;
        }
      }
      if ( i == 0 ) must = t ;
      else if ( ! must . equals ( t ) ) must = "?" ;
    }
    String lost = "Fegla Won" ;
    if ( must . equals ( "?" ) ) {
      System . out . println ( "Case #" + test + ": " + lost ) ;
    }
    else {
      int res = 0 ;
      for ( int i = 0 ;
      i < 111 ;
      i ++ ) res += calc ( q [ i ] ) ;
      System . out . println ( "Case #" + test + ": " + res ) ;
    }
  }
}

public static void main ( String [ ] args ) throws IOException { Scanner sc = new Scanner ( System . in ) ; int numTests = sc . nextInt ( ) ; for ( int test = 1 ; test <= numTests ; test ++ ) { int n = sc . nextInt ( ) ; String must = " " ; int [ ] [ ] q = new int [ 111 ] [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { String s = sc . next ( ) + " ? " ; String t = " " ; int ind = 0 ; char c = ' ? ' ; int cnt = 1 ; for ( int j = 0 ; j < s . length ( ) ; j ++ ) { if ( s . charAt ( j ) == c ) cnt ++ ; else { t += c ; q [ ind ] [ i ] = cnt ; cnt = 0 ; ind ++ ; c = s . charAt ( j ) ; } } if ( i == 0 ) must = t ; else if ( ! must . equals ( t ) ) must = " ? " ; } String lost = " Fegla ▁ Won " ; if ( must . equals ( " ? " ) ) { System . out . println ( " Case ▁ # " + test + " : ▁ " + lost ) ; } else { int res = 0 ; for ( int i = 0 ; i < 111 ; i ++ ) res += calc ( q [ i ] ) ; System . out . println ( " Case ▁ # " + test + " : ▁ " + res ) ; } } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration 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 type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (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: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_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 (decimal_integer_literal)) 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 (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (string_literal)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (character_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: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (identifier))) consequence: (expression_statement (update_expression (identifier))) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (expression_statement (update_expression (identifier))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (identifier))) alternative: (if_statement condition: (parenthesized_expression (unary_expression operand: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) consequence: (expression_statement (assignment_expression left: (identifier) right: (string_literal))))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_literal))) (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (binary_expression left: (string_literal) right: (identifier)) right: (string_literal)) right: (identifier)))))) alternative: (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: (decimal_integer_literal)) update: (update_expression (identifier)) body: (expression_statement (assignment_expression left: (identifier) right: (method_invocation name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (binary_expression left: (string_literal) right: (identifier)) right: (string_literal)) right: (identifier)))))))))))