explode|reduce.[]as$e([];if.[length-1]!=$e then.+[$e]else. end)|implode