#include <iostream>
#include <string>
#include <iostream>
#include <sstream>
#include <vector>
#include <iterator>
std::vector<std::string> tokenize(const std::string& s)
{
using iter = std::istream_iterator<std::string>;
std::istringstream is(s);
return std::vector<std::string>(iter(is), iter());
}
int main()
{
auto tokens = tokenize("test apple");
for (auto& token : tokens)
std::cout << '"' << token << "\"\n";
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8aW9zdHJlYW0+CiNpbmNsdWRlIDxzc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8aXRlcmF0b3I+CgpzdGQ6OnZlY3RvcjxzdGQ6OnN0cmluZz4gdG9rZW5pemUoY29uc3Qgc3RkOjpzdHJpbmcmIHMpCnsKICAgIHVzaW5nIGl0ZXIgPSBzdGQ6OmlzdHJlYW1faXRlcmF0b3I8c3RkOjpzdHJpbmc+OwoKICAgIHN0ZDo6aXN0cmluZ3N0cmVhbSBpcyhzKTsKICAgIHJldHVybiBzdGQ6OnZlY3RvcjxzdGQ6OnN0cmluZz4oaXRlcihpcyksIGl0ZXIoKSk7Cn0KCmludCBtYWluKCkKewogICAgYXV0byB0b2tlbnMgPSB0b2tlbml6ZSgidGVzdCBhcHBsZSIpOwoKICAgIGZvciAoYXV0byYgdG9rZW4gOiB0b2tlbnMpCiAgICAgICAgc3RkOjpjb3V0IDw8ICciJyA8PCB0b2tlbiA8PCAiXCJcbiI7Cn0=