importloggingimportstringfromtestcase_maker.generatorimportTestcaseGeneratorfromtestcase_maker.valuesimportValueGroup,NamedValue,RandomInt,LoopValue,ValueRef,RandomChoicelogging.basicConfig(level=logging.INFO)# Firstly, create a new container to make the testcase stdin structure.values=ValueGroup()# The first line of the input contains a single integer T denoting the number of test cases.values.add(NamedValue(name="T",value=RandomInt(min=1,max=10**4)))values.newline()# For each testcase:# - The first line of each test case contains a single integer N.# - The second line contains a single string S.testcase=ValueGroup()testcase.add(NamedValue(name="N",value=RandomInt(min=2,max=10**5)))testcase.newline()testcase.add(LoopValue(value=RandomChoice(items=list(string.ascii_lowercase)),amount=ValueRef(name="N"),delimiter=""))# Then create T number of testcases.values.add(LoopValue(value=testcase,amount=ValueRef(name="T"),delimiter="\n"))# Generate the testcasesgenerator=TestcaseGenerator(values=values,answer_script="./solution.py")generator.generate()