#include <bits/stdc++.h>
using namespace std;
int main() {
  string str, s1, s2 = "<";
  stack<char> delm;
  vector<string> re;
  getline(cin, str);
  for (int i = 0; i < str.size(); i++) {
    if (str[i] == '"' && delm.empty()) {
      s1 = "<";
      delm.push(str[i]);
    } else if (!delm.empty()) {
      char ch = delm.top();
      if (ch == str[i]) {
        s1 += "*>";
        re.push_back(s1);
        delm.pop();
      } else
        s1 += str[i];
    } else if (delm.empty()) {
      if (str[i] == ' ' && s2.size() > 1) {
        s2 += "*>";
        re.push_back(s2);
        s2 = "<";
      } else if (str[i] != ' ') {
        s2 += str[i];
      }
      if (i == str.size() - 1 && str[str.size() - 1] != ' ') {
        s2 += "*>";
        re.push_back(s2);
        s2 = "<";
        continue;
      }
    }
  }
  for (int i = 0; i < re.size(); i++) {
    bool flag = false;
    for (int j = 1; j < re[i].size() - 1; j++)
      if (re[i][j] != ' ' || re[i][re[i].size() - 1] == '*') {
        flag = true;
        re[i] =
            re[i].substr(0, re[i].size() - 2) + re[i].substr(re[i].size() - 1);
        break;
      }
    if (flag) cout << re[i] << endl;
  }
  return 0;
}
