public static void main ( String [ ] args ) {
  Scanner sc = new Scanner ( System . in ) ;
  int t = sc . nextInt ( ) ;
  String s = "abcdefghijklmnopqrstuvwxyz" ;
  while ( t -- > 0 ) {
    int n = sc . nextInt ( ) ;
    int a = sc . nextInt ( ) ;
    int b = sc . nextInt ( ) ;
    if ( a == b ) {
      String m = "" ;
      for ( int j = 0 ;
      j < n ;
      j ++ ) {
        m += s . charAt ( j % 26 ) ;
      }
      System . out . println ( m ) ;
    }
    else if ( n == a ) {
      String f = "" ;
      for ( int i = 0 ;
      i < n - b + 1 ;
      i ++ ) {
        f += 'a' ;
      }
      f += s . substring ( 1 , b ) ;
      System . out . println ( f ) ;
    }
    else if ( b == 1 ) {
      String f = "" ;
      for ( int i = 0 ;
      i < n ;
      i ++ ) {
        f += 'a' ;
      }
      System . out . println ( f ) ;
    }
    else {
      String m = "" ;
      for ( int j = 0 ;
      j < a ;
      j ++ ) {
        m += s . charAt ( j % 26 ) ;
      }
      String ret = "" ;
      for ( int i = 0 ;
      i < a - b + 1 ;
      i ++ ) {
        ret += 'a' ;
      }
      ret += m . substring ( 1 , b ) ;
      String f = ret ;
      for ( int i = 0 ;
      i < n - ret . length ( ) ;
      i ++ ) {
        f += ret . charAt ( i % a ) ;
      }
      System . out . println ( f ) ;
    }
  }
}

public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int t = sc . nextInt ( ) ; String s = " abcdefghijklmnopqrstuvwxyz " ; while ( t -- > 0 ) { int n = sc . nextInt ( ) ; int a = sc . nextInt ( ) ; int b = sc . nextInt ( ) ; if ( a == b ) { String m = " " ; for ( int j = 0 ; j < n ; j ++ ) { m += s . charAt ( j % 26 ) ; } System . out . println ( m ) ; } else if ( n == a ) { String f = " " ; for ( int i = 0 ; i < n - b + 1 ; i ++ ) { f += ' a ' ; } f += s . substring ( 1 , b ) ; System . out . println ( f ) ; } else if ( b == 1 ) { String f = " " ; for ( int i = 0 ; i < n ; i ++ ) { f += ' a ' ; } System . out . println ( f ) ; } else { String m = " " ; for ( int j = 0 ; j < a ; j ++ ) { m += s . charAt ( j % 26 ) ; } String ret = " " ; for ( int i = 0 ; i < a - b + 1 ; i ++ ) { ret += ' a ' ; } ret += m . substring ( 1 , b ) ; String f = ret ; for ( int i = 0 ; i < n - ret . length ( ) ; i ++ ) { f += ret . charAt ( i % a ) ; } System . out . println ( f ) ; } } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (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: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (update_expression (identifier)) right: (decimal_integer_literal))) 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: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_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: (identifier) right: (decimal_integer_literal)))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_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: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (character_literal))))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal) (identifier))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_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: (character_literal))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))) alternative: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_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: (identifier) right: (decimal_integer_literal)))))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_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: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (character_literal))))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal) (identifier))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (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: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) 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: (identifier) right: (identifier)))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))))))))