T = gets.to_i x = [] T.times { x<< gets.to_i } hantei = true hantei = false unless x[0] == -1 or x[0] == 1 (0..T-2).each do |i| hantei = false unless (x[i].abs - x[i+1]).abs == 1 end if hantei puts 'T' else puts 'F' end