#include bool query(int A, int B, int C); std::vector solve(int N);