#include <iostream>
#include <string>
#include <sstream>
int main()
{
std::istringstream iss { "Cpp|is|fun" };
std::string s;
while ( std::getline( iss, s, '|' ) )
std::cout << s << std::endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8c3N0cmVhbT4KCmludCBtYWluKCkKewogIHN0ZDo6aXN0cmluZ3N0cmVhbSBpc3MgeyAiQ3BwfGlzfGZ1biIgfTsKICAKICBzdGQ6OnN0cmluZyBzOwogIHdoaWxlICggc3RkOjpnZXRsaW5lKCBpc3MsIHMsICd8JyApICkKICAgIHN0ZDo6Y291dCA8PCBzIDw8IHN0ZDo6ZW5kbDsKICAgIAogIHJldHVybiAwOwp9