#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, tmp;
  a.reserve(100000);
  getline(cin, a);
  bool start_flag = false;
  auto i = a.begin();
  string ans;
  while (i != a.end()) {
    if ((*i) == '"' && start_flag == false) {
      ans = "";
      start_flag = true;
    } else if ((*i) == ' ' && start_flag == false && ans != " " && ans != "") {
      ans = "<" + ans + ">";
      cout << ans << endl;
      ans = "";
    } else if ((*i) == '"' && start_flag == true) {
      start_flag = false;
      ans = "<" + ans + ">";
      cout << ans << endl;
      ans = "";
    } else {
      if (ans == " " && start_flag == false) ans = "";
      ans += (*i);
    }
    if (i != a.end()) i++;
  }
  if (ans != "" && ans != " ") {
    ans = "<" + ans + ">";
    cout << ans << endl;
    ans = "";
  }
}
