Bob is a strategy-game programming specialist. In his new city-building game, a city is made up of areas that contain streets, trees, factories, and buildings, together with some unoccupied space. The goal is to earn as much rent as possible from the free space by erecting buildings. Every building must be rectangular, and you want to make it as large as possible. You may not build over any occupied unit — existing buildings, trees, factories, or streets must stay intact.
Each area is divided into a grid of equal square units. The rent earned for each unit covered by a building is 3$. The whole city is divided into $K$ areas; each area has its own length $M$ and width $N$. Occupied units are marked R and free units are marked F.
For each area, help Bob find the largest rectangular building he can erect and report the rent it earns.
The first line contains an integer $K$, the number of areas. Each area is described as follows. The first line contains two integers — the length $M$ ($M \le 1000$) and the width $N$ ($N \le 1000$) — separated by a space. The next $M$ lines each contain $N$ symbols, separated by single spaces:
R — a reserved (occupied) unitF — a free unitA separating line follows each area description.
For each area, print on its own line the profit from erecting the largest possible rectangular building in that area — that is, the building's area in units multiplied by $3$.