#include <bits/stdc++.h>
using namespace std;
char str[100005], temp[100005];
string v[100005];
int main() {
  gets(str);
  int flag = 0, j = 0;
  for (int i = 0; i < strlen(str); i++) {
    if (str[i] == '"') {
      temp[j++] = '<';
      i++;
      while (str[i] != '"') {
        temp[j++] = str[i];
        i++;
      }
      temp[j++] = '>';
      temp[j++] = '\0';
      cout << temp << endl;
      j = 0;
    } else if (str[i] != ' ') {
      temp[j++] = '<';
      while (str[i] != ' ' && str[i] != '\0') {
        if (str[i] == '"' && flag == 0) {
          flag = 1;
          i++;
          continue;
        } else if (str[i] == '"' && flag == 1) {
          flag = 0;
          break;
        }
        temp[j++] = str[i];
        i++;
      }
      temp[j++] = '>';
      temp[j++] = '\0';
      cout << temp << endl;
      j = 0;
    }
  }
  return 0;
}
