Help me in solving ST11 problem

My issue

how to solve this

My code

# Update your code below

t = int(input())
for i in range(t):
    A = input()

Learning course: Python with Data structures
Problem Link: Practice Problem in - CodeChef