#include <bits/stdc++.h>
using namespace std;
int main() {
  string palabra;
  getline(cin, palabra);
  vector<string> resp;
  for (long long i = 0; i < (long long)palabra.size(); i++) {
    string aux;
    if (palabra[i] == '"') {
      string aux;
      i++;
      while (palabra[i] != '"') {
        aux.push_back(palabra[i]);
        i++;
      }
      aux.insert(aux.begin(), '<');
      aux.push_back('>');
      resp.push_back(aux);
      continue;
    }
    if (palabra[i] != ' ') {
      while (palabra[i] != ' ' && i != palabra.size()) {
        aux.push_back(palabra[i]);
        i++;
      }
      aux.insert(aux.begin(), '<');
      aux.push_back('>');
      resp.push_back(aux);
    }
  }
  for (long long i = 0; i < (long long)resp.size(); i++) {
    cout << resp[i] << endl;
  }
  return 0;
}
