#include <bits/stdc++.h>
using namespace std;
inline int max(int a, int b) { return a > b ? a : b; }
inline int min(int a, int b) { return a < b ? a : b; }
inline int gcd(int a, int b) {
  if (a % b)
    return gcd(b, a % b);
  else
    return b;
}
inline int lcm(int a, int b) { return (a * (b / gcd(a, b))); }
inline int And(int mask, int bit) { return mask & (1 << bit); }
inline int Or(int mask, int bit) { return mask | (1 << bit); }
inline int Xor(int mask, int bit) { return mask & (~(1 << bit)); }
char s[100111];
int n, k, i;
vector<string> str;
string a;
deque<string> st;
int main() {
  gets(s);
  n = strlen(s);
  a = "";
  k = 0;
  while (k < n && s[k] == ' ') k++;
  for (i = k; i < n; i++) {
    if (s[i] == '"') {
      k = i + 1;
      a = "";
      while (k < n && s[k] != '"') a += s[k++];
      while (!st.empty()) {
        str.push_back(st.front());
        st.pop_front();
      }
      str.push_back(a);
      i = k;
    } else {
      k = i;
      a = "";
      while (k < n && s[k] != ' ') a += s[k++];
      if (a.size() > 0) st.push_back(a);
      i = k;
    }
  }
  while (!st.empty()) {
    str.push_back(st.front());
    st.pop_front();
  }
  for (int i = 0; i < str.size(); i++) cout << "<" << str[i] << ">" << endl;
  return 0;
}
