public static void main ( String args [ ] ) throws Exception {
  Scanner in = new Scanner ( System . in ) ;
  int t = in . nextInt ( ) ;
  int [ ] [ ] C = new int [ MAXN + 1 ] [ MAXN + 1 ] ;
  for ( int i = 0 ;
  i <= MAXN ;
  i ++ ) {
    C [ i ] [ 0 ] = 1 ;
    for ( int j = 1 ;
    j <= i ;
    j ++ ) {
      C [ i ] [ j ] = ( C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ] ) % MOD ;
    }
  }
  int [ ] [ ] D = new int [ MAXN + 1 ] [ MAXN + 1 ] ;
  int [ ] A = new int [ MAXN + 1 ] ;
  D [ 1 ] [ 0 ] = 1 ;
  for ( int i = 2 ;
  i <= MAXN ;
  i ++ ) {
    for ( int j = 1 ;
    j < i ;
    j ++ ) {
      for ( int k = 0 ;
      k < j ;
      k ++ ) if ( j - k - 1 >= 0 && j - k - 1 <= i - j - 1 ) {
        long cur = D [ j ] [ k ] ;
        cur = ( D [ i ] [ j ] + cur * C [ i - j - 1 ] [ j - k - 1 ] ) % MOD ;
        D [ i ] [ j ] = ( int ) cur ;
      }
      A [ i ] = ( A [ i ] + D [ i ] [ j ] ) % MOD ;
    }
  }
  for ( int tt = 1 ;
  tt <= t ;
  tt ++ ) {
    int n = in . nextInt ( ) ;
    System . out . println ( "Case #" + tt + ": " + A [ n ] ) ;
  };
}

public static void main ( String args [ ] ) throws Exception { Scanner in = new Scanner ( System . in ) ; int t = in . nextInt ( ) ; int [ ] [ ] C = new int [ MAXN + 1 ] [ MAXN + 1 ] ; for ( int i = 0 ; i <= MAXN ; i ++ ) { C [ i ] [ 0 ] = 1 ; for ( int j = 1 ; j <= i ; j ++ ) { C [ i ] [ j ] = ( C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ] ) % MOD ; } } int [ ] [ ] D = new int [ MAXN + 1 ] [ MAXN + 1 ] ; int [ ] A = new int [ MAXN + 1 ] ; D [ 1 ] [ 0 ] = 1 ; for ( int i = 2 ; i <= MAXN ; i ++ ) { for ( int j = 1 ; j < i ; j ++ ) { for ( int k = 0 ; k < j ; k ++ ) if ( j - k - 1 >= 0 && j - k - 1 <= i - j - 1 ) { long cur = D [ j ] [ k ] ; cur = ( D [ i ] [ j ] + cur * C [ i - j - 1 ] [ j - k - 1 ] ) % MOD ; D [ i ] [ j ] = ( int ) cur ; } A [ i ] = ( A [ i ] + D [ i ] [ j ] ) % MOD ; } } for ( int tt = 1 ; tt <= t ; tt ++ ) { int n = in . nextInt ( ) ; System . out . println ( " Case ▁ # " + tt + " : ▁ " + A [ n ] ) ; } ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier) dimensions: (dimensions))) (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)))) (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 (binary_expression left: (identifier) right: (decimal_integer_literal))) dimensions: (dimensions_expr (binary_expression left: (identifier) 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: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (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: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (array_access array: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (array_access array: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) index: (identifier)))) right: (identifier)))))))) (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 (binary_expression left: (identifier) right: (decimal_integer_literal))) dimensions: (dimensions_expr (binary_expression left: (identifier) right: (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 (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (decimal_integer_literal)) index: (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: (identifier)) 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: (identifier)) 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: (identifier)) update: (update_expression (identifier)) body: (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)) right: (decimal_integer_literal)) right: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)) right: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))))) consequence: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (binary_expression left: (identifier) right: (array_access array: (array_access array: (identifier) index: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) index: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)))))) right: (identifier)))) (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (cast_expression type: (integral_type) value: (identifier))))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)))) right: (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: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (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: (array_access array: (identifier) index: (identifier))))))))))