#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[111111];
  gets(s);
  int len = strlen(s);
  int j;
  for (int i = 0; i < len; i++) {
    if (s[i] == ' ') continue;
    if (s[i] == '\"') {
      cout << "<";
      j = i + 1;
      while (s[j] != '\"') {
        printf("%c", s[j]);
        j++;
      }
      cout << ">" << endl;
      i = j;
    }
    if (s[i] != '\"') {
      j = i;
      cout << "<";
      while ((j < len) && (s[j] != '\"') && (s[j] != ' ')) {
        printf("%c", s[j]);
        j++;
      }
      cout << ">" << endl;
      i = j - 1;
    }
  }
}
