#include <bits/stdc++.h>
using namespace std;
using lli = long long;
using pii = pair<int, int>;
int main() {
  ios::sync_with_stdio(false);
  string str;
  getline(cin, str);
  for (int i = 0; i < str.size(); ++i) {
    if (str[i] == '"') {
      string args;
      i++;
      while (i < str.size() and str[i] != '"') {
        args.push_back(str[i]);
        i++;
      }
      cout << '<' << args << '>' << '\n';
    } else if (str[i] != ' ') {
      string args;
      while (i < str.size() and str[i] != ' ') {
        args.push_back(str[i]);
        i++;
      }
      cout << '<' << args << '>' << '\n';
    }
  }
}
