Help me in solving CHFCH problem

My issue

I cant understand the problem statement.provide explanation on provided custom output

My code

# cook your dish here

Problem Link: CHFCH Problem - CodeChef