$~|=!/ /&&3x$'&1x--$_."3$~"for<>;$~=~/.*3|/;print@+