The business world runs on spreadsheets, and Tony needs one small enough to run on a toaster -- meaning it will have just 5 by 5 cells and only the basic operations +, -, *.

The input file DATA5.txt will contain 25 lines -- the first 5 lines are column A: A1, A2, A3, A4, A5. The second 5 lines are column B: B1, B2, B3, B4, B5. Etc. Each line will hold either an integer, or an expression in the form =CELL (operator CELL)*, where (operator CELL) part could be repeated up to 5 times. All input values will be integers, 0 <= n <= 99999. No expression will exceed the value of 99999. There will be no infinite loops in equations. Refer to the sample input for examples.

The output file OUT5.txt will contain 25 lines -- a solved spreadsheet, where each line holds an integer value. The calculations are primitive; the order of calculations are from left to right. That is, the expression =2 + 2 * 3 will equate to 12, not 8.