#include <bits/stdc++.h>
const long long ansmod = 1e9 + 7;
using namespace std;
long long int power(long long int x, long long int y, long long int push) {
  long long int res = 1;
  x = x % ansmod;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % ansmod;
    y = y >> 1;
    x = (x * x) % ansmod;
  }
  return res;
}
long long int modinv(int a, int mod) { return power(a, ansmod - 2, ansmod); }
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
void printit(string s) { cout << "<" << s << ">\n"; }
class Solution {
 public:
  void solve() {
    string s;
    getline(cin, s);
    int n = s.length();
    bool incounter = false;
    string runningstream = "";
    for (int i = 0; i < n; i++) {
      if (s[i] == ' ') {
        if (incounter) {
          runningstream.push_back(s[i]);
        } else {
          if (runningstream.length() == 0) {
            continue;
          }
          printit(runningstream);
          runningstream.clear();
        }
      } else if (s[i] == '"') {
        if (incounter) {
          printit(runningstream);
          incounter = 0;
          runningstream.clear();
        } else {
          incounter = 1;
        }
      } else {
        runningstream.push_back(s[i]);
      }
    }
    if (runningstream.length() != 0) {
      printit(runningstream);
    }
  }
};
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  ;
  int t;
  t = 1;
  while (t--) {
    Solution ob;
    ob.solve();
  }
  return 0;
}
