Regular Brackets Time limit exceeded on test 17