#include <iostream>
#include <string>
int main() {
std::string s = "c c++ \n c# \r java \t python";
std::string delimiters = " \n\r\t";
std::string token;
std::size_t pos;
while ((pos = s.find_first_of(delimiters)) != std::string::npos) {
token = s.substr(0, pos);
if (token != "") {
std::cout << token << std::endl;
}
s.erase(0, pos + 1);
}
if (!s.empty()) {
std::cout << s << std::endl;
}
}
/*
run:
c
c++
c#
java
python
*/