#include <bits/stdc++.h>
using namespace std;
template <typename T>
T sqr(const T &x) {
  return x * x;
}
const int INF = 1e9;
const long double EPS = 1e-9;
const long double PI = acos(-1.0);
const int N = 20002;
int main() {
  string s;
  while (getline(cin, s)) {
    int n = s.size();
    vector<string> ans;
    string tmp = "";
    for (int i = 0; i < int(n); i++) {
      if (s[i] == '"') {
        int j = i + 1;
        tmp = "";
        while (j < n && s[j] != '"') tmp += s[j++];
        ans.push_back(tmp);
        i = j;
        continue;
      }
      if (s[i] != ' ') {
        int j = i;
        tmp = "";
        while (j < n && s[j] != ' ') tmp += s[j++];
        ans.push_back(tmp);
        tmp = "";
        i = j;
      }
    }
    for (int i = 0; i < int(ans.size()); i++)
      cout << '<' << ans[i] << '>' << '\n';
  }
  return 0;
}
