res = "" previous = nil (1..gets.chomp.to_i).each do |i| v = gets.chomp.to_i if i == 1 and v.abs != 1 res = "F" break end if previous.nil? == false and (previous - v).abs == 1 res = "T" else res = "F" end previous = v end puts res