#include <bits/stdc++.h>
using namespace std;
int a[107];
int main() {
  char ss[100007];
  cin.getline(ss, 100004);
  string s = "";
  char c;
  int len = strlen(ss);
  int cnt = 0;
  bool sb = false;
  for (int i = 0; i < len; i++) {
    if (ss[i] == '\"') cnt++;
    if (cnt % 2 == 0 && ss[i] == '\"') {
      cout << '<' << s << '>' << endl;
      s = "";
    }
    if (cnt % 2 == 1 && ss[i] != '\"') s += ss[i];
    if (cnt % 2 == 0 && ss[i] != ' ' && ss[i] != '\"') s += ss[i];
    if (cnt % 2 == 0 && (ss[i] == ' ' || i == len - 1) && s != "") {
      cout << '<' << s << '>' << endl;
      s = "";
    }
  }
}
