#!/usr/bin/perl -l
use warnings;
use strict;
<>;
while ( <> ) {
my $A = <>;
my $B = <>;
my $ok ;
my $c = 27 ;
while ( $c -- ) {
$A ++;
last if $A eq $B ;
last if $A =~ $K and $ok = $A ;
}
}
IyEvdXNyL2Jpbi9wZXJsIC1sCgp1c2Ugd2FybmluZ3M7CnVzZSBzdHJpY3Q7Cgo8PjsKCndoaWxlKDw+KXsKCW15KCB1bmRlZiwgJEsgKSA9IHNwbGl0OwoJCglteSAkQSA9IDw+OwoJY2hvbXAgJEE7CglteSAkQiA9IDw+OwoJY2hvbXAgJEI7CgkKCW15ICRvazsKCW15ICRjID0gMjc7CgkKCXdoaWxlKCAkYyAtLSApewoJCSRBICsrOwoJCWxhc3QgaWYgJEEgZXEgJEI7CgkJbGFzdCBpZiAkQSA9fiAkSyBhbmQgJG9rID0gJEE7CgkJfQoJCglwcmludCBkZWZpbmVkICRvayA/ICRvayA6ICdOTyc7Cgl9
stdin
WAoxMCBtCmNocmlzdG1hc2EKY2hyaXN0bWFzeAo2IG0Kc3ByaW5nCndpbnRlcgoyMSBhCml0aGlua3RoZXJlZm9yZWlzbGVlcAppdGhpbmt0aGVyZWZvcmVpdGhpbmsKMyB6CnRjcwp0Y3oKMyBhCnRjcwp0Y3oKNSBhCml6enpiCmp6enpjCjEgYQpiCmMKMiBtCm1hCm1iCjIgYQptegpvYQ==
X
10 m
christmasa
christmasx
6 m
spring
winter
21 a
ithinkthereforeisleep
ithinkthereforeithink
3 z
tcs
tcz
3 a
tcs
tcz
5 a
izzzb
jzzzc
1 a
b
c
2 m
ma
mb
2 a
mz
oa