#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000 * 100 + 10;
string s;
string out[MAXN];
int size;
int main() {
  ios_base::sync_with_stdio(false);
  getline(cin, s);
  bool start = false;
  bool read = false;
  string tmp;
  s.push_back(' ');
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '"' and start == false)
      start = true;
    else if (s[i] == '"' and start == true) {
      start = false;
      out[size++] = tmp;
      tmp.clear();
    } else if (start)
      tmp.push_back(s[i]);
    else if (read) {
      if (s[i] != ' ')
        tmp.push_back(s[i]);
      else {
        out[size++] = tmp;
        tmp.clear();
        read = false;
      }
    } else if (read == false and s[i] != ' ') {
      tmp.push_back(s[i]);
      read = true;
    }
  }
  for (int i = 0; i < size; i++) cout << "<" << out[i] << ">" << endl;
  return 0;
}
