public static void main ( String [ ] args ) throws IOException {
  Scanner input = new Scanner ( System . in ) ;
  PrintWriter out = new PrintWriter ( new File ( "c.txt" ) ) ;
  int T = input . nextInt ( ) ;
  for ( int t = 0 ;
  t < T ;
  t ++ ) {
    out . print ( "Case #" + ( t + 1 ) + ": \n" ) ;
    int r = input . nextInt ( ) , n = input . nextInt ( ) , m = input . nextInt ( ) , k = input . nextInt ( ) ;
    for ( int rr = 0 ;
    rr < r ;
    rr ++ ) {
      int twopow = 0 , threepow = 0 , fivepow = 0 ;
      for ( int i = 0 ;
      i < k ;
      i ++ ) {
        int p = input . nextInt ( ) ;
        int fives = 0 ;
        while ( p % 5 == 0 && p > 0 ) {
          p /= 5 ;
          fives ++ ;
        }
        fivepow = Math . max ( fives , fivepow ) ;
        int twos = 0 ;
        while ( p % 2 == 0 && p > 0 ) {
          p /= 2 ;
          twos ++ ;
        }
        twopow = Math . max ( twos , twopow ) ;
        int threes = 0 ;
        while ( p % 3 == 0 && p > 0 ) {
          p /= 3 ;
          threes ++ ;
        }
        threepow = Math . max ( threes , threepow ) ;
      }
      int used = 0 ;
      while ( fivepow > 0 ) {
        used ++ ;
        fivepow -- ;
        out . print ( 5 ) ;
      }
      while ( threepow > 0 ) {
        used ++ ;
        threepow -- ;
        out . print ( 3 ) ;
      }
      while ( twopow > n - used ) {
        twopow -= 2 ;
        used ++ ;
        out . print ( 4 ) ;
      }
      while ( used < n ) {
        used ++ ;
        out . print ( 2 ) ;
      }
      out . println ( ) ;
    }
  }
  out . close ( ) ;
}

public static void main ( String [ ] args ) throws IOException { Scanner input = new Scanner ( System . in ) ; PrintWriter out = new PrintWriter ( new File ( " c . txt " ) ) ; int T = input . nextInt ( ) ; for ( int t = 0 ; t < T ; t ++ ) { out . print ( " Case ▁ # " + ( t + 1 ) + " : ▁ \n " ) ; int r = input . nextInt ( ) , n = input . nextInt ( ) , m = input . nextInt ( ) , k = input . nextInt ( ) ; for ( int rr = 0 ; rr < r ; rr ++ ) { int twopow = 0 , threepow = 0 , fivepow = 0 ; for ( int i = 0 ; i < k ; i ++ ) { int p = input . nextInt ( ) ; int fives = 0 ; while ( p % 5 == 0 && p > 0 ) { p /= 5 ; fives ++ ; } fivepow = Math . max ( fives , fivepow ) ; int twos = 0 ; while ( p % 2 == 0 && p > 0 ) { p /= 2 ; twos ++ ; } twopow = Math . max ( twos , twopow ) ; int threes = 0 ; while ( p % 3 == 0 && p > 0 ) { p /= 3 ; threes ++ ; } threepow = Math . max ( threes , threepow ) ; } int used = 0 ; while ( fivepow > 0 ) { used ++ ; fivepow -- ; out . print ( 5 ) ; } while ( threepow > 0 ) { used ++ ; threepow -- ; out . print ( 3 ) ; } while ( twopow > n - used ) { twopow -= 2 ; used ++ ; out . print ( 4 ) ; } while ( used < n ) { used ++ ; out . print ( 2 ) ; } out . println ( ) ; } } out . close ( ) ; }
(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: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (string_literal))))))) (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 (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (string_literal) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (string_literal))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) 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: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) 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: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) body: (block (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) (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) body: (block (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) (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) body: (block (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) (identifier))))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) body: (block (expression_statement (update_expression (identifier))) (expression_statement (update_expression (identifier))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal)))))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) body: (block (expression_statement (update_expression (identifier))) (expression_statement (update_expression (identifier))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal)))))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) body: (block (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (expression_statement (update_expression (identifier))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal)))))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) body: (block (expression_statement (update_expression (identifier))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))