#include <bits/stdc++.h>
using namespace std;
string S[111111];
string s;
int n, m, i, j, top, top1;
char c;
int main() {
  s = '<';
  for (c = getchar(); c != '\n'; c = getchar()) {
    if (c == '"') {
      top ^= 1;
      if (!top) {
        s += '>';
        S[n++] = s;
        s = '<';
      }
    } else if (c == ' ') {
      if (!top) {
        if (top1) {
          s += '>';
          S[n++] = s;
          top1 ^= 1;
          s = '<';
        }
      } else
        s += c;
    } else {
      if (!top && !top1) top1 = 1;
      s += c;
    }
  }
  if (!top && top1) {
    s += '>';
    S[n++] = s;
  }
  for (i = 0; i < n; i++) cout << S[i] << endl;
}
