#include <bits/stdc++.h>
using namespace std;
char arr[100010];
int main() {
  long long i, j, len;
  bool flag, flag_another;
  while (gets(arr)) {
    string a;
    a.clear();
    len = strlen(arr);
    flag = flag_another = 0;
    for (i = 0; i < len; i++) {
      if (arr[i] == 34 && !flag) {
        if (a.size() != 0) cout << "<" << a << ">\n";
        a.clear();
        flag = 1;
      } else if (arr[i] == 34 && flag) {
        cout << "<" << a << ">\n";
        flag = 0;
        a.clear();
      } else if (flag)
        a += arr[i];
      else if (arr[i] != ' ')
        a += arr[i];
      else if (arr[i] == ' ') {
        if (a.size() != 0) cout << "<" << a << ">\n";
        a.clear();
      }
    }
    if (a.size() != 0) cout << "<" << a << ">\n";
    a.clear();
  }
  return 0;
}
