#!/usr/bin/evn perl use strict; use warnings; my ($sa, $pa, $xa) = split / /, <>; my ($sb, $pb, $xb) = split / /, <>; if(length $pa < length $pb) { print "$sb\n"; } elsif(length $pa > length $pb) { print "$sa\n"; } else { my @stra = split //, $pa; my @strb = split //, $pb; for(my $i = 0; $i < length $pa; $i++) { if($stra[$i] < $strb[$i]) { print "$sb\n"; exit; } elsif($stra[$i] > $strb[$i]) { print "$sa\n"; exit; } } } print "-1\n"; exit;