This is my submission 208898289 for the problem 1702E — Split Into Two Sets (1702E - Раздели на два набора). I am getting runtime error on testcase-2, and the Diagnostics Hint in the Verdict shows index-out-of-bounds for visited array. I am unable to find any reason for this happening. Also, I tried submitting the solution increasing the size of visited array by 10 (208897546), but I am getting RTE again. Can someone help?