You have a table with rows and columns. The rows are numbered from to , and the columns are labeled with the letters through .
Each cell in the table is identified by a combination of a column letter and a row number (for example, refers to the cell in column and row ).
The expression consists of mathematical operations and/or applied to these cells. The expressions are guaranteed to be correctly formatted and contain no spaces.
The first line contains the integers and .
The next lines each contain numbers, representing the table's contents.
The final line contains the expression to be evaluated.
The result of the evaluated expression.
Example 1