#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  getline(cin, str);
  vector<string> lecsems;
  bool kav = false;
  char pred = ' ';
  string l;
  for (int i = 0; i < str.size(); i++) {
    if (str[i] == '"') {
      if (kav == false)
        kav = true;
      else if (kav == true) {
        lecsems.push_back(l);
        l.clear();
        kav = false;
      }
      continue;
    }
    if (kav == false) {
      if (str[i] != ' ')
        l += str[i];
      else {
        if (pred != ' ') {
          lecsems.push_back(l);
          l.clear();
        }
      }
      pred = str[i];
    } else {
      l += str[i];
    }
  }
  if (l.size() != 0) lecsems.push_back(l);
  for (int i = 0; i < lecsems.size(); i++)
    cout << "<" << lecsems[i] << ">" << endl;
  return 0;
}
