#include <bits/stdc++.h>
using namespace std;
int main(void) {
  string s;
  getline(cin, s);
  s = " " + s + " ";
  int i = 0;
  while (s[i]) {
    while (s[i] == ' ') i++;
    if (!s[i]) break;
    if (s[i] == '"') {
      int j = i + 1;
      while (s[j] != '"') j++;
      s[j] = 0;
      printf("<%s>\n", s.c_str() + i + 1);
      i = j + 1;
    } else {
      int j = i + 1;
      while (s[j] != ' ') j++;
      s[j] = 0;
      printf("<%s>\n", s.c_str() + i);
      i = j + 1;
    }
  }
  return 0;
}
