#include <bits/stdc++.h>
int main() {
  char s[100006];
  int i, j, k, c;
  gets(s);
  int len = strlen(s);
  for (i = 0; i < len;) {
    if (s[i] == '"') {
      putchar('<');
      k = i + 1;
      while (k < len) {
        if (s[k] == '"') break;
        putchar(s[k]);
        k++;
      }
      i = k + 1;
      putchar('>');
      putchar('\n');
    } else if (s[i] == ' ')
      i++;
    else {
      putchar('<');
      k = i;
      while (k < len) {
        putchar(s[k]);
        k++;
        if (s[k] == ' ') break;
      }
      putchar('>');
      putchar('\n');
      i = k;
    }
  }
  return 0;
}
