#include <iostream>
#include <string>
#include <sstream>

using namespace std;

int main() {
  istringstream buf{"  wort1 wort2 wort3  "};
  string s;
  buf >> s;

  cout << "»" << s << "«" << endl;

  istringstream buf2{"  wort1 wort2 wort3  "};
  string s2;
  buf2 >> noskipws >> s2;

  cout << "»" << s2 << "«" << endl;

  istringstream buf3{"  wort1 wort2 wort3  "};
  string s3;
  getline(buf3, s3);

  cout << "»" << s3 << "«" << endl;

  return 0;
}
