$a=$|++x4;0while++$a=~/(.).*\1/|grep$$_-($_^$a)=~y/ÿ//,@0or(${$0[@0*print"@{[$a=~/./g]} "]= ~$a}=<>)-4