main :: IO () main = interact $ f . g . map read . tail . words g :: [Int] -> [Int] g [x] = [] g (x:y:ys) = (abs (x - y)) : g (y:ys) f :: [Int] -> String f xs = if a == 0 then "T" else "F" where a = length $ filter (/= 1) xs