#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200000;
const int oo = 100000000;
char s[MAXN];
int n, i, j, k;
int main() {
  gets(s);
  n = strlen(s);
  for (i = 0; i < n; i++)
    if (s[i] != ' ') {
      string st;
      if (s[i] == '"') {
        for (j = i + 1; s[j] != '"' && j < n; j++) st += s[j];
      } else {
        for (j = i; s[j] != ' ' && j < n; j++) st += s[j];
      }
      i = j;
      cout << '<' << st << '>' << endl;
    }
  return 0;
}
