#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, 0, -1, 0, 1, -1, 1, -1};
int dy[] = {0, 1, 0, -1, 1, 1, -1, -1};
const int WHITE = 0, GRAY = 1, BLACK = 2, GREEN = 3, BLUE = 4;
const int LIM = 1e+6;
const long long INF = 1e+9, MOD = 1e+9 + 7;
const double PI = 3.141592653589793, EPS = 1e-7;
int main() {
  ios_base::sync_with_stdio(0);
  string s;
  bool b = false;
  getline(cin, s);
  s = ' ' + s;
  s += ' ';
  vector<string> ans;
  string t;
  for (int i = 0; i < (int)s.length(); i++) {
    if (!b && s[i] == ' ' && t.empty()) {
      continue;
    } else if (!b && s[i] == ' ' && s[i] != '"' && !t.empty()) {
      ans.push_back(t);
      t.clear();
    } else if (!b && s[i] != ' ' && s[i] != '"') {
      t += s[i];
    } else if (s[i] == '"' && !b) {
      b = true;
    } else if (s[i] == '"' && b) {
      b = false;
      ans.push_back(t);
      t.clear();
    } else if (s[i] != '"' && b) {
      t += s[i];
    }
  }
  for (vector<string>::iterator s = ans.begin(); s != ans.end(); s++) {
    cout << '<' << *s << '>' << '\n';
  }
  return 0;
}
