CF677D Vanya and Treasure

Description

Vanya is in the palace that can be represented as a grid $ n×m $ . Each room contains a single chest, an the room located in the $ i $ -th row and $ j $ -th columns contains the chest of type $ a_{ij} $ . Each chest of type $ x

Input Format

N/A

Output Format

N/A