#include <bits/stdc++.h>
using namespace std;
int main() {
  string x, r = "";
  getline(cin, x);
  int len = x.size();
  bool ok = false;
  for (__typeof(len) i = 0; i < len; i++) {
    if (x[i] == '"') {
      if (ok) {
        ok = false;
        cout << "<" << r << ">" << endl;
        r = "";
      } else
        ok = true;
    } else if (ok || x[i] != ' ') {
      if (ok)
        r += x[i];
      else {
        while (i < len && x[i] != ' ') r += x[i++];
        cout << "<" << r << ">" << endl;
        r = "";
        i--;
      }
    }
  }
  return 0;
}
