s//123 456 789 z147,258,369,159,3570/;$?=/(.)\1\1/?die$1:/\d/?<>:die(Tie)while!s/$?/$p/g||print$`x/z/,$p=$p^h?X:O