#include <bits/stdc++.h>
using namespace std;
int N, M, T;
int main() {
  int i, j, k;
  string str, temp;
  str = " ";
  getline(cin, temp);
  str += temp;
  str += " ";
  k = str.size();
  bool op = false;
  for (i = 0; i < k; i++) {
    if (str[i] == '"') {
      if (op)
        printf(">\n");
      else
        printf("<");
      op = !op;
    } else if (op)
      printf("%c", str[i]);
    else if (str[i] != ' ') {
      if (str[i - 1] == ' ' || str[i - 1] == '"') printf("<");
      printf("%c", str[i]);
      if (str[i + 1] == ' ' || str[i + 1] == '"') printf(">\n");
    }
  }
}
