#include <bits/stdc++.h>
using namespace std;
int main() {
  string cad;
  getline(cin, cad);
  stringstream is(cad);
  int pos = 0;
  int n = cad.size();
  while (pos < n) {
    if (cad[pos] == '\"') {
      int pos2 = pos + 1;
      string cad2 = "";
      while (pos2 < n && cad[pos2] != '\"') {
        cad2 += cad[pos2++];
      }
      pos = pos2 + 1;
      cout << "<" << cad2 << ">" << endl;
      if (pos >= n) return 0;
    } else if (cad[pos] == ' ') {
      while (pos < n && cad[pos] == ' ') pos++;
    } else {
      string cad2 = "";
      while (pos < n && cad[pos] != ' ') cad2 += cad[pos++];
      cout << "<" << cad2 << ">" << endl;
    }
  }
  return 0;
}
