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