#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.sync_with_stdio(false);
  string s;
  getline(cin, s);
  s += ' ';
  bool opened = false;
  string w;
  for (size_t i = 0; i < s.size(); ++i) {
    int c = s[i];
    if (!opened && c == '"') {
      assert(w.empty());
      opened = true;
    } else if ((opened && c == '"') || (!opened && c == ' ')) {
      if (opened || !w.empty()) cout << "<" << w << ">\n";
      w.clear();
      opened = false;
    } else {
      w += c;
    }
  }
  return 0;
}
