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