#include <bits/stdc++.h>
using namespace std;
map<int, int> mp;
vector<string> v;
int main() {
  string s;
  getline(cin, s);
  bool f = 0;
  s += " ";
  string t;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == ' ') {
      if (f)
        t.push_back(s[i]);
      else {
        if (t.size()) {
          v.push_back("<" + t + ">");
          t.clear();
        }
      }
    } else if (s[i] == '"') {
      if (f) {
        f = 0;
        v.push_back("<" + t + ">");
        t.clear();
      } else
        f = 1;
    } else
      t += s[i];
  }
  for (int i = 0; i < v.size(); i++) cout << v[i] << endl;
  return 0;
}
