<>;map{printf'compare =%3d swap =%3d data:'.'%3d'x@_.$/,++$#,$-+=$_[$==--$_]<$_[--$_]&&(@_[$_,$=]=@_[$=,$_],1),@_}2..--$.for@_=<>