you garland consist n lamp each lamp color red green blue the color ith lamp s_i r g b color lamp garlandyou recolor lamp garland recoloring lamp mean change initial color way obtain garland niceA garland call nice lamp color distance divisible Ie obtain garland t j t_i t_j satisfied ij mod 3 0 the value x mean absolute value x operation x mod y mean remainder x divide yFor example follow garland nice rgbrgbrg GB r grbgrbg brgbrgb the follow garland nice RR RGBGAmong way recolor initial garland nice choose minimum number recolore lamp if multiple optimal solution print