People from four different cities have come for an interview: Amethi, Trichy, Goa and Cochin. They are all seated on a long row of chairs waiting for their turn. A seating plan is termed good if no person finds himself sandwiched between two persons from the same city that is different from his. For example, ['C', 'A', 'T', 'G', 'C', 'T'] is a bad seating plan as the person from Goa finds two persons from Trichy seated on either side. ['A', 'T', 'T', 'T', 'G', 'A', 'T'] is a good seating plan as even though the person from Trichy is sitting between two persons from Trichy, they are still from his city.
This seating plan is represented by a list L. Write a function named plan_type that accepts L as argument. It should return the string "good" if it is a good seating plan, and "bad" otherwise. You can assume that len(L) >= 3. Sample input-output behavior is given below:
Select the correct implementation of this function.