Find all files with the extension .txt, extract all words from them, sort them alphabetically and print them as a single string separated by spaces.
find . -type f -name '*.txt' -exec grep -o -E '\w+' {} \; | sort -u | tr '\n' ' '