a parenthesis stre nonempty string consist it valid follow condition trueIt it write AB a concatenate B A b valid parenthesis stringsIt write a a valid parenthesis stringYou give m x n matrix parenthese grid a valid parenthesis string path grid path satisfying follow conditionsThe path start upper left cell 0 0the path end bottomright cell m 1 n 1the path move rightthe result parenthesis stre form path validReturn true exist valid parenthesis string path grid otherwise return false example 1input grid output trueexplanation the diagram show possible path form valid parenthesis stringsthe path show result valid parenthesis stre the second path show result valid parenthesis stre note valid parenthesis stre pathsExample 2input grid output falseexplanation the possible path form parenthese string since valid parenthese string return false Constraintsm gridlengthn gridilength1 m n 100gridij