#include <bits/stdc++.h>
template <typename T>
inline void SWAP(T &a, T &b) {
  T tmp = a;
  a = b;
  b = tmp;
}
template <typename T>
inline T ABS(const T &val) {
  return val < 0 ? -val : val;
}
template <typename T>
inline T MAX(const T &a, const T &b) {
  return a > b ? a : b;
}
template <typename T>
inline T MIN(const T &a, const T &b) {
  return a < b ? a : b;
}
const int INTinf = 2147483647;
const int nINTinf = 0 - 2147483648;
using namespace std;
int n, ans;
map<int, int> mp;
const int MAX_SIZE = 100005;
char s[MAX_SIZE];
int state;
int main() {
  cin.getline(s, MAX_SIZE);
  state = 0;
  int i = 0;
  char *start;
  while (s[i]) {
    char &ch = s[i];
    switch (state) {
      case 0:
        switch (ch) {
          case ' ':
            break;
          case '"':
            state = 1;
            start = &s[i + 1];
            break;
          default:
            state = 2;
            start = &ch;
            break;
        }
        break;
      case 1:
        if (ch == '"') {
          state = 0;
          ch = 0;
          printf("<%s>\n", start);
          break;
        }
        break;
      case 2:
        switch (ch) {
          case ' ':
            state = 0;
            ch = 0;
            printf("<%s>\n", start);
            break;
          case '"':
            state = 1;
            ch = 0;
            printf("<%s>\n", start);
            start = &s[i + 1];
            break;
        }
        break;
    }
    ++i;
  }
  if (state == 2) {
    printf("<%s>\n", start);
  }
  return 0;
}
