$|=1; sub i{$_=<>;/M/&&exit;$_+0} sub o{print"@_\n"} o F while i>0; o L; while(1){o L while!i;o F;i;o R}