#include <bits/stdc++.h>
using namespace std;
int main() {
  bool in = false;
  string cur = "";
  string inp;
  getline(cin, inp);
  int i = 0;
  while (i < (int)inp.length()) {
    char c = inp[i];
    if (c == '\"') {
      if (in) {
        in = false;
        cout << '<' << cur << ">\n";
        cur = "";
      } else {
        in = true;
        if ((int)cur.length() > 0) cout << '<' << cur << ">\n";
        cur = "";
      }
    } else if (c == ' ') {
      if (in)
        cur += ' ';
      else {
        if ((int)cur.length() > 0) cout << '<' << cur << ">\n";
        cur = "";
      }
    } else
      cur += c;
    i++;
  }
  if ((int)cur.length() > 0) cout << '<' << cur << ">\n";
  return 0;
}
