#include <bits/stdc++.h>
const int BUF_LEN = 100005;
void print_arguments(const char *s) {
  const char *c = s;
  char cur_arg[BUF_LEN];
  char *cur = cur_arg;
  bool quote_open = false;
  bool printed = true;
  while (*c) {
    if (*c == '"') {
      if (quote_open) {
        quote_open = false;
      } else {
        if (printed) printed = false;
        quote_open = true;
      }
      ++c;
    } else if (*c == ' ' && !quote_open) {
      ++c;
      if (!printed) {
        *cur = 0;
        cur = cur_arg;
        printf("<%s>\n", cur_arg);
        printed = true;
      }
    } else if (*c == '\n') {
      break;
    } else {
      if (printed) printed = false;
      *cur++ = *c++;
      *cur = 0;
    }
  }
  if (!printed) {
    *cur = 0;
    printf("<%s>\n", cur_arg);
  }
}
int main() {
  char buf[BUF_LEN];
  if (!fgets(buf, BUF_LEN, stdin)) return 1;
  print_arguments(buf);
  return 0;
}
