#include <bits/stdc++.h>
using namespace std;
string str, lex;
int inner, read;
void printCommand(string s) { cout << '<' << s << '>' << endl; }
int main() {
  getline(cin, str);
  inner = 0;
  read = 0;
  lex = "";
  for (unsigned int i = 0; i < str.length(); i++) {
    if (inner == 0) {
      if (read == 0) {
        if (str[i] == ' ') continue;
        if (str[i] == '"') {
          inner = 1;
          lex = "";
        } else {
          read = 1;
          lex = str[i];
        }
      } else {
        if (str[i] == ' ') {
          printCommand(lex);
          lex = "";
          read = 0;
        } else if (str[i] == '"') {
          printCommand(lex);
          lex = "";
          inner = 1;
          read = 0;
        } else {
          lex += str[i];
        }
      }
    } else {
      if (str[i] == '"') {
        printCommand(lex);
        lex = "";
        inner = 0;
        read = 0;
      } else {
        lex += str[i];
      }
    }
  }
  if (lex != "") printCommand(lex);
}
