#include <bits/stdc++.h>
using namespace std;
template <typename first>
inline first abs(const first& a) {
  return a < 0 ? -a : a;
}
template <typename first>
inline first sqr(const first& a) {
  return a * a;
}
const int INF = 1000 * 1000 * 1000;
const long double EPS = 1e-9;
const long double PI = 3.1415926535897932384626433832795;
string s, t;
int n;
inline bool read() {
  if (!getline(cin, s)) return false;
  n = int(s.size());
  return true;
}
inline void solve() {
  int pos = 0;
  while (pos < n) {
    while (pos < n && s[pos] == ' ') pos++;
    if (pos == n) break;
    t.clear();
    if (s[pos] == '"') {
      pos++;
      while (s[pos] != '"') {
        t.push_back(s[pos]);
        pos++;
      }
      pos++;
      printf("<%s>\n", t.c_str());
    } else {
      while (pos < n && s[pos] != ' ') {
        t.push_back(s[pos]);
        pos++;
      }
      printf("<%s>\n", t.c_str());
    }
  }
}
int main() {
  cout << setprecision(10) << fixed;
  cerr << setprecision(5) << fixed;
  assert(read());
  solve();
  return 0;
}
