#include <bits/stdc++.h>
using namespace std;
string a;
void work(string s) {
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != ' ' && (i == 0 || s[i - 1] == ' ')) cout << "<";
    if (s[i] != ' ') cout << s[i];
    if (s[i] != ' ' && (i == s.size() - 1 || s[i + 1] == ' ')) cout << ">\n";
  }
}
int main() {
  getline(cin, a);
  int i = 1, p = 0, p0 = 0;
  while ((p0 = a.find('"', p)) != a.npos) {
    if (i % 2 == 0)
      cout << "<" << a.substr(p, p0 - p) << ">\n";
    else
      work(a.substr(p, p0 - p));
    p = p0 + 1;
    i++;
  }
  if (i % 2 == 0)
    cout << "<" << a.substr(p, a.size() - p) << ">\n";
  else
    work(a.substr(p, a.size() - p));
  return 0;
}
