$..=$_ for( qw(^,?y,(.),:^ y?y ?@xz?:^ .?y .mvm.:^ :?y :grr::^ .? udvn'',(ebmv%
//,^ .)[1,0,2]:^ :?~e :^,\1:^ `^ &^'::^y?~f?@xz?xz@?:^:?~e:^,\1^,\2:^2^1^2::));
$_=$.;y*^y: @wx fez %db uvm?*$q; auc ysh top jil=*;eval;print for($q,$;,$ .,$/)
####
s **lil*;$ *= join '', sort split q **; s ;.*;grr; &&s +(.(.)).+$ 2$ 1+ ; $ ; =
qq -$_-;s ,.*,ahc,;$ ,.= chop for split q ,,, reverse;print for($ ,,$ ;,$ *,$ /)
##
##
s **lil*, $ .=$ *=$ _, s ,.*,ahc,, $ ,= $ _, $ *= join'' ,sort split q **, $*; s
?.*?grr? ? s?(.(.)).?$2$1? : m:(.+),: ? s?.((.).)?$1$2? : s::$&: ; $ ;=$ _; $ .=
$ ,,$ ,= m,{?($1)},;$ ,.=chop for split q ,,,reverse$ .;print for($ ,,$ ;,$*,$/)
##
##
$,=42;for(34,0,-3,9,-11,11,-17,7,-5){$*.=pack'c'=>$,+=$_}for(reverse split//=>$*
){$%++?$ %%2?push@C,$_,$":push@c,$_,$":(push@C,$_,$")&&push@c,$"}$C[$#C]=$/;($#C
>$#c)?($ c=\@C)&&($ C=\@c):($ c=\@c)&&($C=\@C);$%=$|;for(@$c){print$_^$$C[$%++]}