#include <bits/stdc++.h>
using namespace std;
vector<string> k;
int main() {
  string s;
  getline(cin, s);
  int qot = 0;
  int i = 0;
  while (i < s.length()) {
    if (qot % 2 == 1) {
      string s2 = "";
      while (s[i] != '"' && i < s.length()) {
        s2 += s[i];
        i += 1;
      }
      k.push_back(s2);
      qot += 1;
      i += 1;
    } else {
      while (s[i] != '"' && i < s.length()) {
        while (s[i] == ' ') {
          i += 1;
          if (i == s.length()) break;
        }
        string s2 = "";
        while (s[i] != ' ' && s[i] != '"' && i < s.length()) {
          s2 += s[i];
          i += 1;
        }
        if (s2.length()) {
          k.push_back(s2);
        }
      }
      qot += 1;
      i += 1;
    }
  }
  for (int j = 0; j < k.size(); j++) cout << '<' << k[j] << '>' << endl;
  return 0;
}
