public static void main ( String [ ] args ) {
  Scanner sc = new Scanner ( System . in ) ;
  String s = sc . nextLine ( ) ;
  boolean quote = false ;
  boolean closed = true ;
  int cur = 0 ;
  StringBuilder sb = new StringBuilder ( ) ;
  for ( int i = 0 ;
  i < s . length ( ) ;
  i ++ ) {
    char c = s . charAt ( i ) ;
    if ( c == '"' ) {
      if ( ! quote ) {
        quote = true ;
        sb . append ( '<' ) ;
        cur = 1 ;
        closed = false ;
      }
      else {
        sb . append ( ">\n" ) ;
        cur = 0 ;
        quote = false ;
        closed = true ;
      }
    }
    else if ( c == ' ' ) {
      if ( quote ) {
        sb . append ( c ) ;
      }
      else {
        if ( cur > 0 ) {
          sb . append ( ">\n" ) ;
          cur = 0 ;
          closed = true ;
        }
        else {
        }
      }
    }
    else {
      if ( cur == 0 ) sb . append ( '<' ) ;
      closed = false ;
      sb . append ( c ) ;
      cur ++ ;
    }
  }
  if ( ! closed ) sb . append ( '>' ) ;
  System . out . println ( sb ) ;
}

public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; String s = sc . nextLine ( ) ; boolean quote = false ; boolean closed = true ; int cur = 0 ; StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { char c = s . charAt ( i ) ; if ( c == ' " ' ) { if ( ! quote ) { quote = true ; sb . append ( ' < ' ) ; cur = 1 ; closed = false ; } else { sb . append ( " > \n " ) ; cur = 0 ; quote = false ; closed = true ; } } else if ( c == ' ▁ ' ) { if ( quote ) { sb . append ( c ) ; } else { if ( cur > 0 ) { sb . append ( " > \n " ) ; cur = 0 ; closed = true ; } else { } } } else { if ( cur == 0 ) sb . append ( ' < ' ) ; closed = false ; sb . append ( c ) ; cur ++ ; } } if ( ! closed ) sb . append ( ' > ' ) ; System . out . println ( sb ) ; }
(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: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (false))) (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (true))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_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: (method_invocation object: (identifier) 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: (identifier) name: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (character_literal))) consequence: (block (if_statement condition: (parenthesized_expression (unary_expression operand: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (true))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (character_literal)))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (expression_statement (assignment_expression left: (identifier) right: (false)))) alternative: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (expression_statement (assignment_expression left: (identifier) right: (false))) (expression_statement (assignment_expression left: (identifier) right: (true)))))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (character_literal))) consequence: (block (if_statement condition: (parenthesized_expression (identifier)) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) alternative: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (expression_statement (assignment_expression left: (identifier) right: (true)))) alternative: (block))))) alternative: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (character_literal))))) (expression_statement (assignment_expression left: (identifier) right: (false))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (update_expression (identifier)))))))) (if_statement condition: (parenthesized_expression (unary_expression operand: (identifier))) consequence: (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (character_literal))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))