#include <algorithm>
#include <iomanip>
#include <iostream>
#include <random>
#include <vector>
struct S
{
int a;
int b;
int c;
};
bool order_by_a(const S& lhs, const S& rhs)
{
return lhs.a < rhs.a;
}
std::ostream& operator<<(std::ostream& out, const S& s)
{
return out << '(' << std::setw(2) << s.a <<
", " << std::setw(2) << s.b <<
", " << std::setw(2) << s.c << ')';
}
S generate_s()
{
static std::mt19937 gen{std::random_device{}()};
static std::uniform_int_distribution<> dist(0, 10);
return {dist(gen), dist(gen), dist(gen)};
}
template<typename T>
std::ostream& print(std::ostream& out, T cont)
{