#include <bits/stdc++.h>
int main() {
  int i, n, k;
  char a[1000001], c[1000001];
  scanf("%[^\n]s", a);
  n = strlen(a);
  for (i = 0; i < n; i++) {
    if (a[i] == ' ')
      continue;
    else if (a[i] == '"') {
      k = 0;
      for (i++; i < n; i++) {
        if (a[i] == '"') break;
        c[k++] = a[i];
      }
      c[k] = '\0';
      printf("<%s>\n", c);
    } else {
      k = 0;
      for (; i < n && a[i] != ' ' && a[i] != '"'; i++) c[k++] = a[i];
      c[k] = '\0';
      printf("<%s>\n", c);
    }
  }
  return 0;
}
