strings: input, sort, output