#include <bits/stdc++.h>
char ch;
inline void bg() { printf("<"); }
inline void ed() { printf(">\n"); }
bool flag, cct;
int main() {
  flag = 0;
  while ((ch = getchar()) != -1) {
    if (ch == '\n') break;
    if (ch == '"') {
      if (cct) {
        ed();
        cct = 0;
      }
      if (flag)
        ed();
      else
        bg();
      flag ^= 1;
      continue;
    }
    if (flag) {
      putchar(ch);
      continue;
    }
    if (ch == ' ') {
      if (cct) {
        cct = 0;
        ed();
      }
      continue;
    }
    if (cct)
      putchar(ch);
    else {
      cct = 1;
      bg();
      putchar(ch);
    }
  }
  if (cct) ed();
  return 0;
}
