There are 13 lights, A, B, C, …, L, M, in the dormitory and each one has its own switch. To save matron having to operate all 13 switches, 34 pairs of lights are connected. They are:
AB, AC, AD, AJ, BC, BE, BI, CE, CF, CG, CH, CI, CK, CM, DE, DF, DG, DI, DJ, DK, DL, DM, EF, EG, EH, EI, EJ, EL, FJ, FM, GH, GM, KL, LM.
Whenever a switch is operated it changes its own light and each of the lights connected to it from on to off, or from off to on. When matron enters the dormitory at 9.00 pm all the lights are on. As an example, if she operates switch A then lights A, B, C, D and J go off. If she then operates switch J then lights A, D and J come back on and lights E and F go off.
Question: Which switches should matron operate so that all the lights are off when she has finished.