#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  bool in_quotes{false};
  string sub;
  vector<string> vec;
  for (int i{}; i < s.size(); ++i) {
    if (s[i] == '"') {
      if (!in_quotes) {
        in_quotes = true;
        if (!sub.empty()) vec.push_back(sub);
        sub.clear();
      } else {
        in_quotes = false;
        vec.push_back(sub);
        sub.clear();
      }
    } else {
      if (in_quotes) {
        sub += s[i];
      } else {
        if (s[i] != ' ') {
          sub += s[i];
          if (i == s.size() - 1) {
            if (!sub.empty()) vec.push_back(sub);
          }
        } else {
          if (!sub.empty()) vec.push_back(sub);
          sub.clear();
        }
      }
    }
  }
  for (auto val : vec) cout << "<" << val << ">\n";
  return 0;
}
