#include <bits/stdc++.h>
using namespace std;
int n;
char in[100005];
string tmp;
bool inside;
int main() {
  while (gets(in)) {
    inside = false;
    tmp = "";
    n = strlen(in);
    for (int i = 0; i <= n - 1; i++) {
      if (in[i] == '"') {
        if (!inside)
          inside = true;
        else {
          inside = false;
          cout << "<" << tmp << ">\n";
          tmp = "";
        }
      } else {
        if (inside)
          tmp += in[i];
        else {
          if (in[i] == ' ') {
            if (tmp != "") {
              cout << "<" << tmp << ">\n";
              tmp = "";
            }
          } else
            tmp += in[i];
        }
      }
    }
    if (tmp != "") {
      cout << "<" << tmp << ">\n";
      tmp = "";
    }
  }
  return 0;
}
