Descriptions:

Email from Polycarp

CodeForces - 1185B