#include <bits/stdc++.h>
using namespace std;
int main(void) {
  string z;
  for (int c; cin >> ws, ~(c = cin.peek()); cout << '<' << z << ">\n")
    if ('"' ^ c)
      cin >> z;
    else
      cin.ignore(), getline(cin, z, '"');
  return 0;
}
