#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long binpow(long long a, long long n) {
  long long res = 1;
  while (n) {
    if (n & 1) res *= a;
    a *= a;
    res %= mod;
    a %= mod;
    n >>= 1;
  }
  return res;
}
int main() {
  string s, t;
  getline(cin, s);
  vector<string> ans;
  bool open = false;
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] == '"') {
      if (open) {
        ans.push_back(t);
        t = "";
        open = false;
      } else {
        open = true;
      }
    } else {
      if (open) {
        t += s[i];
      } else {
        if (s[i] != ' ') {
          t += s[i];
        } else {
          if (t.length() >= 1) {
            ans.push_back(t);
            t = "";
          }
        }
      }
    }
  }
  if (t.length() >= 1) {
    ans.push_back(t);
  }
  for (int i = 0; i < ans.size(); ++i) {
    cout << '<' << ans[i] << '>' << endl;
  }
  return 0;
}
