#include <bits/stdc++.h>
using namespace std;
char s[100100], a[100100];
void gao(char a[]) {
  int start = 0;
  for (int i = 0; a[i]; i++) {
    if (a[i] != ' ') {
      if (!start) {
        putchar('<');
        start = 1;
      }
      putchar(a[i]);
    } else if (start) {
      puts(">");
      start = 0;
    }
  }
  if (start) puts(">");
  return;
}
int main() {
  gets(s);
  int len = 0;
  int flag = 0;
  for (int i = 0; s[i]; i++) {
    if (s[i] == '\"') {
      flag = 1 - flag;
      if (flag == 0) {
        printf("<%s>\n", a);
      } else {
        gao(a);
      }
      len = 0;
      a[0] = 0;
    } else {
      a[len] = s[i];
      len++;
      a[len] = 0;
    }
  }
  gao(a);
}
