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