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