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