Alice and Bob have a rectangular board divided into a grid with r rows and c columns. Each character of s represents one cell. There are four types of cells: 'E' denotes an exit. There may be arbitrarily many exits, possibly zero. 'T' means the square contains a single token. Initially there will be exactly one token on the entire board. '#' denotes an obstacle. '.' denotes an empty cell. Alice and Bob will play a game on this board. The game is parameterized by the int k. The token initially has the number k on it. The players will take alternating turns, starting with Alice. A player's turn consists of the following steps: The player moves the token one square up, down, left, or right. The token cannot go over the edge of the board and it cannot enter a cell with an obstacle. If this token is on an exit, it disappears from the board. Otherwise, subtract one from the number on the token. If the number on the token is zero, remove it from the board. The first player unable to make a move loses the game. (This happens when the token is stuck and also when it already left the board.) You are given the vector s and the int k Compute the winner of the game, assuming both Alice and Bob play optimally. Return the winner's name: either "Alice" or "Bob". Note that the return value is case-sensitive.
First Line will contain number of test cases. The first line of every test case will contain r. Then next r lines will contain characters <= 50. Then next line will contain k.
Constraints- 1 <= t <=100 r will be between 1 and 50, inclusive. s will contain exactly r elements, each consisting of c characters. Each character of each element of s will be one of 'T', 'E', '#', or '.'. There will be exactly 1 'T' charcters within all elements of s. k will be between 1 and 100, inclusive.