#include <bits/stdc++.h>
using namespace std;
char s[100005];
int main() {
  while (gets(s)) {
    int n = strlen(s);
    bool c = 0;
    string x = "";
    for (int i = 0; i < n; i++) {
      if (s[i] == '"') {
        if (c)
          printf("<%s>\n", x.c_str());
        else if (x.size())
          printf("<%s>\n", x.c_str());
        c = !c;
        x = "";
        continue;
      }
      if (c)
        x += s[i];
      else {
        if (s[i] != ' ')
          x += s[i];
        else if (x.size()) {
          printf("<%s>\n", x.c_str());
          x = "";
        }
      }
    }
    if (x.size()) printf("<%s>\n", x.c_str());
  }
  return 0;
}
