#include <iostream>
#include <string>
#include <vector>

std::vector<std::string> str;

void setup(){
	std::string s = "scott>=tiger>=mushroom>=fail";
	std::string delimiter = ">=";

	size_t start = 0, pos;
	std::string token;
	while ((pos = s.find(delimiter, start)) != std::string::npos) {
		token = s.substr(start, pos-start);
		str.push_back(token);
		start = pos + delimiter.size();
	}
	if (start < s.size())
		str.push_back(s.substr(start));

	for(auto &elem : str)
		std::cout << elem << std::endl;
}

int main() {
	setup();
	return 0;
}