#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)1e5 + 9;
const int inf = (int)1e9 + 7;
int main() {
  string s;
  getline(cin, s);
  vector<string> ans;
  while (!s.empty()) {
    if (s[0] == ' ') {
      s.erase(0, 1);
      continue;
    }
    if (s[0] == '"') {
      s.erase(0, 1);
      string q = "";
      while (s[0] != '"') {
        q += s[0];
        s.erase(0, 1);
      }
      ans.push_back(q);
      s.erase(0, 1);
      continue;
    }
    if (s[0] != ' ') {
      string q = "";
      while (!s.empty() && s[0] != ' ') {
        q += s[0];
        s.erase(0, 1);
      }
      ans.push_back(q);
    }
  }
  for (__typeof(ans.begin()) i = ans.begin(); i != ans.end(); ++i)
    cout << "<" << *i << ">\n";
  return 0;
}
