Input
3 A 30 4 3 3 010 101 010 C 20 5 5 5 10001 01010 00000 01010 10001 L 10 6 3 5 11000 10000 10011 12 22 A.............._.....L ..............__...... ......__......__...... ......__.............. ................__.... ................__.... ..........__.......... ............__........ .....__............... .....__............... ...........__......... C......__............L 6
Output
Mushrooms at day 0 A.............._.....L 0.............._.....0 ..............__...... ..............__...... ......__......__...... ......__......__...... ......__.............. ......__.............. ................__.... ................__.... ................__.... ................__.... ..........__.......... ..........__.......... ............__........ ............__........ .....__............... .....__............... .....__............... .....__............... ...........__......... ...........__......... C......__............L 0......__............0 Mushrooms at day 1 AA............._...L.L 10............._...0.1 A.............__...L.. 0.............__...0.. ......__......__...... ......__......__...... ......__.............. ......__.............. ................__.... ................__.... ................__.... ................__.... ..........__.......... ..........__.......... ............__........ ............__........ .....__............... .....__............... ..C..__............... ..0..__............... .C.........__......LL. .0.........__......00. C......__..........L.L 1......__..........0.1 Mushrooms at day 2 AAA............_.LLL.L 210............_.001.2 AA............__.L.LLL 10............__.0.100 A.....__......__.L..LL 0.....__......__.0..00 ......__.............. ......__.............. ................__.... ................__.... ................__.... ................__.... ..........__.......... ..........__.......... C...C.......__........ 0...0.......__........ .C.C.__............... .0.0.__............... C.C..__..........LLL.. 0.1..__..........000.. .C.C.......__....LLLL. .1.0.......__....0011. C.C.C..__........LLLLL 2.0.0..__........00102 Mushrooms at day 3 AAAA..........._LLLLLL 3210..........._011203 AAA...........__LLLLLL 210...........__010211 AA....__......__.LLLLL 10....__......__.10011 A.....__.......L..LL.L 0.....__.......0..00.0 ................__.... ................__.... ..C...C.........__.... ..0...0.........__.... .C.C.C....__.......... .0.0.0....__.......... C.C.C.......__........ 1.0.1.......__........ .C.C.__........LLLL... .1.1.__........0000... C.C.C__........LLLLL.. 1.2.0__........00111.. .C.C.C.....__..LLLLLLL .2.1.0.....__..0011220 C.C.C..__......LLLLLLL 3.1.1..__......0011213 Mushrooms at day 4 .AAAA.........L_LLLLLL .3210.........0_122314 AAAA..........__LLLLLL 3210..........__121322 AAA...__.....L__LLLLLL 210...__.....0__021122 AA..C.__C....L.LLLLLLL 10..0.__0....0.1001101 AC.C.C.C.....L..__.LLL 00.0.0.0.....0..__.000 C.C.C.C.........__.... 0.1.0.1.........__.... .C.C.C.C..__.......... .1.1.1.0..__.......... C.C.C.C.C...__LLLL.... 2.1.2.0.0...__0000.... .C.C.__C.....LLLLLL... .2.2.__0.....001111... C.C.C__......LLLLLLLL. 2.3.1__......00112220. .C.C.C.....__LLLLLLLLL .3.2.1.....__001122331 C.C.C.C__....LLLLLLLLL 4.2.2.0__....001122324 Mushrooms at day 5 ..AAAA......L.L_LLLLLL ..3210......0.1_233425 .AAAA.C...CLL.__LLLLLL .3210.0...000.__232433 AAAA.C__.C.LLL__LLLLLL 3210.0__.0.001__132233 AAA.C.__C..LLLLLLLLLLL 210.1.__1..00102112212 AA.C.C.C.C.L.LLL__LLLL 10.1.1.1.0.0.100__0111 A.C.C.C.C.CL..LL__LLLL 0.2.1.2.0.00..00__0000 .C.C.C.C.C__LLLLL..... .2.2.2.1.0__00000..... C.C.C.C.C..L__LLLL.... 3.2.3.1.1..0__1111.... .C.C.__C.C.LLLLLLLLL.. .3.3.__1.0.001122220.. C.C.C__.C.CLLLLLLLLLL. 3.4.2__.0.00011223331. .C.C.C.C.C.__LLLLLLLLL .4.3.2.0.0.__112233442 ..C.C.C__..LLLLLLLLLLL ..3.3.1__..00112233435 Mushrooms at day 6 ...AAAAC.CLCL.L_LLLLL. ...32100.0001.2_34453. ..AAAAC.CLCLLL__LLLLLL ..32101.001110__343544 .AAAAC__.CLCLL__LLLLLL .32101__.10012__243344 AAAAC.__CLCLCLLLLLLLLL 32102.__20010213223323 AAAC.C.C.CLCLLLL__LLLL 2102.2.2.1000211__1222 AAC.C.C.CLCLLLLL__LLLL 103.2.3.10110011__1111 AC.C.C.C.C__LLLLLLLLLL 03.3.3.2.1__1111100000 C.C.C.C.CLCL__LLLLL... 4.3.4.2.2001__22220... .C.C.__C.CLCLLLLLLLL.. .4.4.__2.10012233331.. C...C__.CLCLLLLLLLLLLL 4...3__.10111223344420 ...C.C.C.CL__LLLLLLLLL ...4.3.1.10__223344553 ..C.C.C__LCLCLLLLLLLL. ..4.4.2__001022334454.