#include <iostream>
#include <iterator>
#include <sstream>
#include <string>
#include <vector>

using namespace std;

int main() {
	vector<string> combo1;
	vector<string> combo2;
	vector<int> combo3;
	istringstream foo("a1     b00     2222\na1     b01     233\na1     b92     34444\na2     b00      2222\na2     b00      3333\na2     b01      3333");
	vector<string> combos{istream_iterator<string>(foo), istream_iterator<string>()};

	for(auto i = 0; i < combos.size(); ++i) {
	    switch(i % 3) {
	    case 0:
	        combo1.push_back(combos[i]);
	        break;
	    case 1:
	        combo2.push_back(combos[i]);
	        break;
	    case 2:
	        combo3.push_back(stoi(combos[i]));
	    }
	}
	
	for(const auto& i : combo1) cout << i << ' ';
	cout << endl;
	for(const auto& i : combo2) cout << i << ' ';
	cout << endl;
	for(const auto& i : combo3) cout << i << ' ';
	cout << endl;
}