#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[100000] = {0};
  while (gets(a)) {
    long l, i, j, v = 0;
    l = strlen(a);
    for (i = 0; i < l; i++) {
      if (a[i] == '"') {
        cout << "<";
        for (j = i + 1; j < l; j++) {
          if (a[j] != '"')
            cout << a[j];
          else {
            v = 1;
            cout << ">\n";
            i = j;
            break;
          }
        }
        i = j;
        if (v == 0) cout << ">\n";
        v = 0;
      } else if (a[i] != '"' && a[i] != ' ') {
        cout << "<";
        for (j = i; j < l; j++) {
          if (a[j] != ' ')
            cout << a[j];
          else {
            v = 1;
            cout << ">\n";
            i = j;
            break;
          }
        }
        i = j;
        if (v == 0) cout << ">\n";
        v = 0;
      }
    }
    a[l] = '\0';
  }
  return 0;
}
