#include <bits/stdc++.h>
using namespace std;
int firstSpaceSymbol(const string &s, int beg) {
  for (size_t i = beg; i < s.length(); i++) {
    if (s[i] == ' ') {
      return i;
    }
  }
  return s.length();
}
int firstNonSpaceSymbol(const string &s, int beg) {
  for (size_t i = beg; i < s.length(); i++) {
    if (s[i] != ' ') {
      return i;
    }
  }
  return s.length();
}
int firstQuotesSymbol(const string &s, int beg) {
  for (size_t i = beg; i < s.length(); i++) {
    if (s[i] == '\"') {
      return i;
    }
  }
  return s.length();
}
void func(vector<string> &v, const string &s, size_t next) {
  if (next >= s.length()) return;
  int ind = firstNonSpaceSymbol(s, next);
  bool quotes = false;
  if (ind == s.length()) {
    return;
  }
  if (s[ind] == '\"') {
    quotes = true;
  }
  if (quotes) {
    int quotes_end = firstQuotesSymbol(s, ind + 1);
    quotes = false;
    string sub = s.substr(ind + 1, quotes_end - ind - 1);
    v.push_back(sub);
    func(v, s, quotes_end + 1);
  } else {
    int ind_end = firstSpaceSymbol(s, ind + 1);
    string sub = s.substr(ind, ind_end - ind);
    v.push_back(sub);
    func(v, s, ind_end + 1);
  }
}
int main() {
  string s;
  getline(cin, s);
  vector<string> v;
  v.reserve(s.length());
  func(v, s, 0);
  for (size_t i = 0; i < v.size(); i++) {
    cout << '<' << v[i] << '>' << endl;
  }
}
