Help me in solving CIRCUITS problem

My issue

My code

# cook your dish here

Problem Link: CIRCUITS Problem - CodeChef