#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100000;
int size;
char command[MAXN + 3], write[MAXN + 5];
inline void work(int index, char c, bool &boolean) {
  if (command[index] == c) {
    write[size++] = 0;
    printf("<%s>\n", write);
    size = 0;
    boolean = false;
  } else
    write[size++] = command[index];
}
int main() {
  fgets(command, MAXN + 3, stdin);
  int len = strlen(command);
  bool quotes = false, word = false;
  for (int i = 0; i < len - 1; i++) {
    if (quotes)
      work(i, '"', quotes);
    else if (word)
      work(i, ' ', word);
    else if (command[i] == '"')
      quotes = true;
    else if (command[i] == ' ')
      continue;
    else
      word = true, write[size++] = command[i];
  }
  if (word) write[size++] = 0, printf("<%s>\n", write);
  return 0;
}
