#include <bits/stdc++.h>
using namespace std;
void op(string s) { cout << '<' + s + '>' << endl; }
string s, le = "";
int st = 0;
int main() {
  getline(cin, s);
  int l = s.length();
  for (int(i) = (0); (i) < (l); (i)++) {
    if (s[i] == '"') {
      if (st == 1 || le != "") {
        op(le);
        le = "";
      }
      st = !st;
    } else if (s[i] != ' ' || st) {
      le += s[i];
    } else if (le != "") {
      op(le);
      le = "";
    }
  }
  if (le != "") op(le);
  return 0;
}
