#include <bits/stdc++.h>
using namespace std;
#pragma warning(disable : 4996)
string s, s1;
int main() {
  std::getline(cin, s);
  s = s + " #";
  int p = 0;
  while (1) {
    s1 = "";
    while (s[p] == ' ') p++;
    if (s[p] == '#') break;
    if (s[p] == '"') {
      p++;
      while (s[p] != '"') {
        s1 = s1 + s[p];
        p++;
      }
      p++;
    } else
      while (s[p] != ' ') {
        s1 = s1 + s[p];
        p++;
      }
    cout << '<' << s1 << '>' << endl;
  };
  return 0;
};
