: react ( seq -- seq' ) [ [ length ] [ dup 2 [ first2 - abs 32 = ] find drop [ dup 2 + rot [ delete-slice ] keep ] when* ] over tri rot = not ] loop ; "input5.txt" utf8 file-contents but-last-slice >sbuf [ react length . ] [ [ 26 ] dip CHAR: A CHAR: Z [a,b] [ [ clone ] dip 2dup 32 + [ [ = ] curry reject! ] 2bi@ drop ] 2map [ react length ] map infimum . ] bi