#include <bits/stdc++.h>
using namespace std;
string s, t;
int i;
bool f;
void cap(string s) { cout << "<" << s << ">\n"; }
int main() {
  getline(cin, s);
  for (i = 0; i < s.length(); i++)
    if (s[i] == '"')
      if (f) {
        cap(t);
        t = "";
        f = false;
      } else
        f = true;
    else if (f)
      t += s[i];
    else if (s[i] != ' ')
      t += s[i];
    else {
      if (t.length() > 0) cap(t);
      t = "";
    }
  if (t.length() > 0) cap(t);
  return 0;
}
