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