School Team Contest #2 Problem F BerPaint