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