#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<string> vs;
  char c;
  bool quote = 0;
  string com = "";
  while (cin >> noskipws >> c) {
    if (c == '"') {
      if (quote) {
        vs.push_back(com);
        com = "";
        quote = 0;
      } else {
        quote = 1;
      }
    } else {
      if (quote) {
        com += c;
      } else {
        if (c == ' ') {
          if (com != "") {
            vs.push_back(com);
            com = "";
          }
        } else {
          com += c;
        }
      }
    }
  }
  if (com != "") {
    string tmp = "";
    for (int i = 0; i < com.size() - 1; i++) {
      tmp += com[i];
    }
    if (tmp != "") vs.push_back(tmp);
  }
  for (int i = 0, _n = (vs.size()); i < _n; i++) {
    cout << "<" << vs[i] << ">" << endl;
  }
  return 0;
}
