#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  for (int i = 0; i < s.length(); i++)
    if (s[i] == '"') {
      int j = i;
      i++;
      while (s[i] != '"') i++;
      string s1 = s.substr(j + 1, i - j - 1);
      cout << '<' << s1 << '>' << endl;
      i++;
    } else if (s[i] != ' ') {
      int j = i;
      while (s[i] != ' ' && i < s.length()) i++;
      string s1 = s.substr(j, i - j);
      cout << '<' << s1 << '>' << endl;
    }
}
