#include <bits/stdc++.h>
using namespace std;
int main() {
  char input[100005];
  cin.getline(input, 100005);
  string in(input);
  int len = in.size();
  bool isOpen = false;
  bool isOut = false;
  int start = -1;
  string out = "";
  for (int i = 0; i < len; ++i) {
    if (isOpen) {
      if (in[i] == '"') {
        out += string(in.begin() + start, in.begin() + i);
        isOpen = false;
      }
    } else {
      if (in[i] == '"') {
        start = i + 1;
        isOpen = true;
        isOut = true;
      } else if (in[i] == ' ') {
        if (isOut) {
          cout << "<" << out << ">" << endl;
          out = "";
          isOut = false;
        }
      } else {
        out += in[i];
        isOut = true;
      }
    }
  }
  if (isOut) {
    cout << "<" << out << ">" << endl;
    out = "";
    isOut = false;
  }
  return 0;
}
