#include <bits/stdc++.h>
using namespace std;
string s;
int n;
int main() {
  getline(cin, s);
  n = s.length();
  int l = 0, r;
  while (l < n) {
    while (l < n && s[l] == ' ') l++;
    if (l == n) break;
    r = l + 1;
    if (s[l] == '"') {
      while (s[r] != '"') r++;
      cout << '<' << s.substr(l + 1, r - l - 1) << '>' << '\n';
      l = r + 1;
    } else {
      while (r < n && s[r] != ' ') r++;
      cout << '<' << s.substr(l, r - l) << '>' << '\n';
      l = r;
    }
  }
  return 0;
}
