#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  string s;
  getline(cin, s);
  int n = s.size();
  string lec = "";
  int a = 0;
  bool f = 0;
  vector<string> ans;
  for (int i = 0; i < n; i++) {
    if (a == 0) {
      if (s[i] == ' ') {
        a = 1;
        if (f) {
          ans.push_back(lec);
          lec = "";
          f = 0;
        }
      } else {
        if (s[i] == '"') {
          a = 2;
        } else {
          f = 1;
          lec += s[i];
        }
      }
    } else if (a == 1) {
      if (s[i] == '"') {
        f = 1;
        a = 2;
      } else if (s[i] != ' ') {
        f = 1;
        lec += s[i];
        a = 0;
      }
    } else if (a == 2) {
      if (s[i] == '"') {
        a = 0;
        ans.push_back(lec);
        lec = "";
        f = 0;
      } else {
        lec += s[i];
      }
    }
  }
  if (f) ans.push_back(lec);
  for (string i : ans) cout << "<" << i << ">\n";
}
