#include <vector>

std::vector<int> solve(int N, std::vector<int> U, std::vector<int> V);