#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int main() {
  char c;
  while (scanf("%c", &c)) {
    if (c == '\n') break;
    if (c == '"') {
      cout << '<';
      scanf("%c", &c);
      while (c != '"') {
        cout << c;
        scanf("%c", &c);
      }
      puts(">");
    } else {
      if (c != ' ') {
        cout << '<' << c;
        scanf("%c", &c);
        while (c != ' ' && c != '\n') {
          cout << c;
          scanf("%c", &c);
        }
        puts(">");
      }
    }
  }
}
