#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  vector<string> res;
  string s;
  getline(cin, s);
  string buf;
  size_t len = s.length();
  bool started = false;
  for (int i = 0; i < len; i++) {
    char next = s[i];
    if (next == '"' && started) {
      res.push_back(buf);
      buf = "";
      started = false;
    } else if (next == '"') {
      started = true;
    } else if (started) {
      buf += next;
    } else if (next == ' ') {
      if (buf.length() > 0) {
        res.push_back(buf);
        buf = "";
      }
    } else {
      buf += next;
    }
  }
  if (buf.length() > 0) {
    res.push_back(buf);
  }
  for (int i = 0; i < res.size(); i++) {
    cout << "<" << res[i] << ">" << endl;
  }
  return 0;
}
