#include <bits/stdc++.h>
using namespace std;
string str;
int main() {
  getline(cin, str);
  for (int i = 0; i < str.length(); i++) {
    while (i < str.length() && str[i] == ' ') i++;
    if (i == str.length()) break;
    string tmp = "";
    if (str[i] == '"') {
      while (str[++i] != '"') tmp += str[i];
    } else
      while (i < str.length() && str[i] != ' ') tmp += str[i++];
    cout << '<' << tmp << '>' << endl;
  }
  return 0;
}
