#include <bits/stdc++.h>
using namespace std;
int main() {
  string line, tmp;
  vector<string> res;
  getline(cin, line);
  bool flag;
  int j;
  for (int i = 0; i < line.size(); i++) {
    if (line[i] == '"') {
      tmp = "";
      for (j = i + 1; j < line.size(); j++) {
        if (line[j] == '"') break;
        tmp += line[j];
      }
      i = j;
      res.push_back(tmp);
    } else {
      flag = false;
      tmp = "";
      for (j = i; line[j] != ' ' && j < line.size(); j++) {
        if (line[j] == '"') {
          flag = true;
          break;
        }
        tmp += line[j];
      }
      if (!flag && tmp.size()) {
        i = j - 1;
        res.push_back(tmp);
      }
    }
  }
  for (int i = 0; i < res.size(); i++) {
    cout << "<" << res[i] << ">" << endl;
  }
  return 0;
}
