for(<>){@a=split;$p=shift@a;@b=map{$r=$_-$p;$p=$_;$r}@a;for(0..25){print($_+1,$/),last if"@b"eq"@{[((@b[0..$_])x500)[0..$#b]]}"}}