#!/usr/bin/env perl use strict; use utf8; use warnings; my $t = <>; my $p = 0; for (1...$t) { my $x = <>; chomp $x; if (abs($p - $x) != 1) { print "F\n"; exit; } $p = $x; } print "T\n";