S-6 Fixed the solution for a new test case