#include <bits/stdc++.h>
int main() {
  int i, j, length;
  char s[100009], temp[100009];
  gets(s);
  length = strlen(s);
  for (i = 0; i < length; i++) {
    if (s[i] == '"') {
      for (j = 0, i += 1; s[i] != '"' && i < length; i++, j++) temp[j] = s[i];
      temp[j] = '\0';
      if (j)
        printf("<%s>\n", temp);
      else
        printf("<>\n");
    } else if (s[i] != ' ') {
      for (j = 0; s[i] != ' ' && i < length; j++, i++) temp[j] = s[i];
      temp[j] = '\0';
      printf("<%s>\n", temp);
    }
  }
  return 0;
}
