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