#include <bits/stdc++.h>
char s[100005], c;
int p;
bool f;
void print() {
  s[p++] = 0;
  printf("<%s>\n", s);
  p = 0;
}
int main() {
  while ((c = getchar()) != EOF)
    if (c == '\n') {
    } else if (c == '\"')
      if (f) {
        print();
        f = 0;
      } else if (p) {
        print();
        f = 1;
      } else
        f = 1;
    else if (c == ' ')
      if (f)
        s[p++] = c;
      else if (p)
        print();
      else {
      }
    else
      s[p++] = c;
  if (p) print();
  return 0;
}
