#include <iostream>
#include <string>

int main() {
	const std::string s = "quick \t\t brown \t fox jumps over the\nlazy dog";
	const std::string ws = " \t\r\n";
	std::size_t pos = 0;
	while (pos != s.size()) {
		std::size_t from = s.find_first_not_of(ws, pos);
		if (from == std::string::npos) {
			break;
		}
		std::size_t to = s.find_first_of(ws, from+1);
		if (to == std::string::npos) {
			to = s.size();
		}
		std::cout << "'";
		for (std::size_t i = from ; i != to ; i++) {
			std::cout << s[i];
		}
		std::cout << "'" << std::endl;
		pos = to;
	}
	return 0;
}