#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  bool sw = 0;
  string tmp = "";
  vector<string> arr;
  vector<bool> v;
  for (int i = 0; i < (int)(s.size()); i++) {
    if (s[i] == '"') {
      if (!sw) {
        if ((int)(tmp.size()) != 0) {
          arr.push_back(tmp);
          v.push_back(0);
          tmp = "";
        }
        sw = 1;
      } else {
        arr.push_back(tmp);
        v.push_back(1);
        sw = 0;
        tmp = "";
      }
    } else {
      tmp += s[i];
    }
  }
  if ((int)(tmp.size()) != 0) {
    arr.push_back(tmp);
    v.push_back(0);
  }
  for (int i = 0; i < (int)(arr.size()); i++) {
    if (v[i]) {
      cout << "<" << arr[i] << ">\n";
    } else {
      tmp = "";
      for (int j = 0; j < (int)(arr[i].size()); j++) {
        if (arr[i][j] == ' ') {
          if ((int)(tmp.size()) == 0)
            continue;
          else {
            cout << "<" << tmp << ">\n";
            tmp = "";
          }
        } else
          tmp += arr[i][j];
      }
      if ((int)(tmp.size()) != 0) cout << "<" << tmp << ">\n";
    }
  }
  return 0;
}
