Problem of hackerearth

sir this is the question
i am not getting any hint how to solve this problem
can u give some hint

@qudsiya try to think of some pattern like every row consists of 6 seats. try making some formula