#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  int b = 0, pre = 0;
  vector<string> v;
  string temp = "";
  for (int i = 0; i < s.length(); i++) {
    if (pre == 0 && s[i] == ' ')
      continue;
    else if (s[i] != ' ')
      pre = 1;
    if (b == 0) {
      if (s[i] == '"') {
        temp = "";
        b = 1;
      } else if (s[i] == ' ') {
        if (i == s.length() - 1 || s[i + 1] != ' ') {
          v.push_back(temp);
          temp = "";
        }
      } else {
        temp += s[i];
        if (i == s.length() - 1) v.push_back(temp);
      }
    } else {
      if (s[i] == '"') {
        b = 0;
        if (i == s.length() - 1) v.push_back(temp);
      } else {
        temp += s[i];
      }
    }
  }
  for (int i = 0; i < v.size(); i++) {
    cout << "<" << v[i] << ">" << endl;
  }
  return 0;
}
