#include <iostream>
#include <vector>
#include <algorithm>

int main(){

	std::vector<int> al{ 0, 1, 2, 3, 4, };
	std::vector<int> ar{ 5, 6, 7, 8, 9, };
	std::vector<std::vector<int>> k(5);

	for (std::size_t i = 0; i < 5; i++)
	{
		for (std::size_t j = 0; j < 5; j++)
		{
			k[j].push_back(al[j]);
			k[j].push_back(ar[j]);

		}
		std::rotate(al.begin(), al.begin() + 1, al.end());
		std::rotate(ar.rbegin(), ar.rbegin() + 1, ar.rend());
	}

	for (auto& oo : k){
		for (auto& o : oo){
			std::cout << o;
		}
		std::cout << std::endl;
	}
	std::cout << "5Count!!" << std::endl;

	return 0;
}