Talia and Terra are playing a variant of dots and boxes. Just as in the original version, you are given an $$$n$$$ by $$$m$$$ grid of dots, and Talia and Terra will take turns connecting two cardinally adjacent dots with a segment. In this version, once a region is fully enclosed by a set of segments, all cells that aren't possessed yet in that region are possessed by the person who placed the last segment enclosing the region. Once a cell is possessed, neither player may place any more segments connecting two corners of that cell. Once a player cannot place a segment, they lose the game.
To make the game more interesting, some segments will already be added to the board before the game even begins. It is guaranteed that no set of segments initially on the game board will enclose a region. If Talia makes the first move, and both Talia and Terra play optimally, who will win the game?
The first line of input will consist of two integers $$$n$$$ and $$$m$$$ ($$$2 \leq n, m \leq 500$$$) — the number of rows and columns of the grid of dots.
The following $$$2n-1$$$ lines will each consist of $$$2m-1$$$ characters denoting the initial state of the board. For each $$$i$$$ ($$$1 \leq i \leq n$$$) and $$$j$$$ ($$$1 \leq j \leq m$$$):
It is guaranteed that no set of segments initially on the game board will enclose a region.
Output "Talia" (without quotes) if Talia wins the game; otherwise, output "Terra" (without quotes). The output is case sensitive.
2 3*.*.*.....*.*.*
Talia
5 5*-*-*-*-*|.|.....|*.*-*.*.*|...|.|.|*.*-*-*.*|...|...|*.*-*.*.*|.|...|.|*.*-*-*.*
Terra
| Name |
|---|


