#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const double EPS = 1e-8;
const double PI = acos(-1);
int main() {
  string line;
  while (getline(cin, line)) {
    bool f = 0;
    for (__typeof((line).begin()) it = (line).begin(); it != (line).end();
         ++it) {
      if (*it == '"')
        f ^= 1;
      else {
        if (f && *it == ' ') *it = '*';
      }
    }
    stringstream ss(line);
    string s;
    while (ss >> s) {
      if (s.size() && s[0] == '"') s = s.substr(1, s.size() - 2);
      for (__typeof((s).begin()) it = (s).begin(); it != (s).end(); ++it)
        if (*it == '*') *it = ' ';
      cout << "<" << s << ">" << endl;
    }
  }
}
