#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  string cur = "";
  int open = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '"') {
      open++;
      if (open % 2 == 0) {
        cout << "<" << cur << ">\n";
        cur = "";
      }
    } else if (s[i] == ' ') {
      if (open % 2)
        cur += s[i];
      else {
        if (i > 0 and s[i - 1] != ' ' and s[i - 1] != '"') {
          cout << "<" << cur << ">\n";
          cur = "";
        }
      }
    } else
      cur += s[i];
  }
  if (cur != "") cout << "<" << cur << ">\n";
  return 0;
}
