#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  int i, o = 0;
  getline(cin, s);
  for (i = 0; i < s.length(); i++) {
    if (s[i] == '"')
      o ^= 1;
    else if (o || s[i] != ' ')
      t += s[i];
    else if (t.length() || (i > 0 && s[i - 1] == '"'))
      cout << "<" << t << ">" << endl, t = "";
  }
  if (t.length() || (i > 0 && s[i - 1] == '"')) cout << "<" << t << ">";
  return 0;
}
