#include <bits/stdc++.h>
using namespace std;
char str[100005];
int main() {
  cin.getline(str, 100005);
  int y = 0;
  int l = strlen(str);
  int has = 0;
  for (int i = 0; i < l; i++) {
    if (y == 1 && str[i] != '"') {
      cout << str[i];
      continue;
    }
    if (str[i] == '"') {
      if (y == 0) {
        y = 1;
        if (has) {
          cout << '>' << endl;
          has = 0;
        }
        cout << '<';
      } else if (y == 1) {
        cout << '>' << endl;
        y = 0;
      }
      continue;
    }
    if (str[i] == ' ') {
      if (has) {
        cout << '>' << endl;
        has = 0;
      }
      continue;
    }
    if (has)
      cout << str[i];
    else {
      has = 1;
      cout << '<' << str[i];
    }
  }
  if (str[l - 1] != '"' && str[l - 1] != ' ') cout << '>' << endl;
  return 0;
}
