#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  bool lbl = false;
  bool lbl2 = false;
  vector<string> answer;
  int pos = 0;
  for (int i = 0; i < s.size(); i++) {
    if (lbl) {
      if (s[i] == '"') {
        answer.push_back(s.substr(pos + 1, i - pos - 1));
        lbl = false;
      }
      continue;
    } else {
      if (s[i] == '"') {
        lbl = true;
        pos = i;
        continue;
      }
      if (s[i] == ' ') {
        if (lbl2) {
          answer.push_back(s.substr(pos, i - pos));
          lbl2 = false;
          continue;
        } else
          continue;
      }
      if (lbl2)
        continue;
      else {
        pos = i;
        lbl2 = true;
        continue;
      }
    }
  }
  if (lbl2) answer.push_back(s.substr(pos));
  for (int i = 0; i < answer.size(); i++) {
    cout << '<' << answer[i] << '>' << endl;
  }
  return 0;
}
