#include <bits/stdc++.h>
using namespace std;
vector<string> v;
int main() {
  string s, t = "";
  getline(cin, s);
  int i = 0;
  while (i < s.length()) {
    if (s[i] == '"') {
      if (t != "") v.push_back(t), t = "";
      i++;
      while (s[i] != '"') {
        t += s[i++];
      }
      v.push_back(t);
      t = "";
    } else if (s[i] != ' ') {
      t += s[i];
    } else {
      if (t != "") v.push_back(t);
      t = "";
    }
    i++;
  }
  if (t != "") v.push_back(t);
  for (int i = 0; i < v.size(); i++) {
    cout << "<" << v[i] << ">\n";
  }
  return 0;
}
