#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  string s, aux;
  getline(cin, s);
  for (int k = 0; k < s.length(); k++) {
    if (s[k] == '"') {
      k++;
      while (s[k] != '"') {
        aux += s[k];
        k++;
      }
      cout << "<" << aux << ">" << endl;
      aux = "";
      k++;
    } else if (s[k] != ' ') {
      while (s[k] != ' ') {
        aux += s[k];
        if (k >= s.length() - 1) break;
        k++;
      }
      cout << "<" << aux << ">" << endl;
      aux = "";
    }
  }
  return 0;
}
