#include <bits/stdc++.h>
using namespace std;
char szStr[100005];
int main() {
  gets(szStr);
  char* s;
  char* p;
  s = p = szStr;
  while (*p) {
    while (*p == ' ') p++;
    if (!(*p)) return 0;
    if (*p == '\"') {
      p++;
      s = p;
      while (*p && (*p) != '\"') {
        p++;
      }
      *p = 0;
      printf("<%s>\n", s);
    } else {
      s = p;
      while (*p && (*p) != ' ') {
        p++;
      }
      *p = 0;
      printf("<%s>\n", s);
    }
    p++;
  }
  return 0;
}
