give root binary tree construct 0indexe m x n string matrix re represent format layout tree the format layout matrix construct follow rulesThe height tree height number row m equal height 1the number column n equal 2height1 1Place root node middle row formally location res0n12for node place matrix position resrc place leave child resr1c2heightr1 right child resr1c2heightr1continue process nod tree placedany cell contain stre Return construct matrix re Example 1input root 12Output 1 2example 2input root 123null4output 1 23 4 ConstraintsThe number nod tree range 1 21099 Nodeval 99The depth tree range 1 10