main :: IO () main = interact $ f . g . h . map read . tail . words h :: [Int] -> [Int] h [x] = if x == -1 || x == 1 then [] else [10, 20] h ys = ys 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