#include <bits/stdc++.h>
using namespace std;
string s;
vector<char> v;
int main() {
  ios_base::sync_with_stdio(false);
  getline(cin, s);
  int cnt = 0;
  bool mark;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '"')
      cnt++;
    else {
      v.push_back(s[i]);
      if (s[i] != ' ') mark = true;
    }
    if (mark == true &&
        (i == s.size() - 1 || (s[i] == ' ' && s[i + 1] != ' ')) &&
        ((cnt != 1 || s[i] == '"') && cnt != 2)) {
      mark = false;
      string t = "";
      for (int i = 0; i < v.size(); i++)
        if (v[i] != ' ') t += v[i];
      v.clear();
      cout << "<" << t << ">" << endl;
    }
    if (cnt == 2) {
      cnt = 0;
      string t = "";
      for (int i = 0; i < v.size(); i++) t += v[i];
      v.clear();
      mark = false;
      cout << "<" << t << ">" << endl;
    }
    if (cnt == 1 && s[i] == '"') v.clear();
  }
  return 0;
}
