Encode text messages as permutations