you give square board character you board start right square marked character syou need reach leave square marked character e the rest square label numeric character 1 2 9 obstacle x in leave upleft diagonally obstacle therereturn list integer integer maximum sum numeric character collect second number path maximum sum take modulo 109 7In case path return 0 0 example 1input board e232x212soutput 71Example 2Input board e121x121soutput 42example 3input board e11xxx11soutput 00 constraints2 boardlength boardilength 100