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