First test case.
Final solution.