CodeForces 238 div 2, A, B and C, AC.