..
Solution to CodeForces
CF814C An impassioned circulation of affection