[Question]
  [
My homework is to write a ***Martian essay*** (see below) between 729 and 810 words, inclusive. Your task is to write a program that will generate the essay.
## History
Around the turn of the 20th century, spiritualist Catherine-Elise Müller allegedly communicated with Martians. During somnambulatory trances, she would write out Martian scripts. Psychologist Théodore Flourney discovered her Martian writings were very similar to her native French, and in his book "From India to the Planet Mars", he documented Catherine's Martian alphabet.
The following is *loosely* based on that alphabet with an extended mythos.
## Problem Description
The Martian language has 21 letters, shown here next to each Latin equivalent:
[![enter image description here](https://i.stack.imgur.com/CkpKv.png)](https://i.stack.imgur.com/CkpKv.png)
Unfortunately, there's no Unicode for Martian (despite Mars being part of the universe), so we're stuck using Latin characters.
Whereas in English our phonemes break out into two major types (consonants/vowels) which we loosely map to letters, Martian has three letter types:
* The vowels: a e i m n o u
* The hard consonants: b c d g k p t
* The soft consonants: f h l r s v z
In addition to this, the Martian language contains a single punctuation mark--the period.
A **Martian word** is a set of 3 to 9 letters. All Martian words have at least one vowel, one hard consonant, and one soft consonant (in any arrangement). For example, `fng`, `cdaz`, `vpi`, and `pascal` are Martian words.
A **Martian sentence** is a set of 3 to 9 Martian words delimited by spaces and followed by a period.
A **Martian paragraph** is a set of 3 to 9 Martian sentences delimited by spaces and followed by a newline.
A **Martian essay** is a collection of Martian paragraphs that contains no contiguous word repetitions.
A **contiguous word repetition** is any construct S S where S is a contiguous set of words. Note that this definition ignores sentence and paragraph boundaries.
### Examples
*Please note: There's a single trailing newline following each example (since all Martian paragraphs end in a newline)*
***Not Martian essay***
```
lorem ipsum dolor sit amet. quis nostrud exercitation ullamco laboris.
```
...for many reasons. This example is to illustrate some miscellaneous rules:
* lorem is not a Martian word because it has no hard consonants.
* amet is not a Martian word because it has no soft consonants. (`m` is a Martian vowel).
* quis is not a Martian word because it has no hard consonants
* quis is not a Martian word because q is not a Martian letter
* exercitation is not a Martian word because it has more than 9 letters
* exercitation is not a Martian word because x is not a Martian letter
***Martian essay***
```
fng cdaz vpi. pascal broke basic. popplers taste great.
```
...because it is a Martian paragraph. The Martian paragraph contains three Martian sentences.
***Not Martian essay***
```
fng cdaz vpi. pascal broke basic. free pascal rules.
```
...since `free pascal rules.` is not a Martian sentence, because neither `free` nor `rules` are Martian words, because they do not have any hard consonants.
***Martian essay***
```
fng cdaz vpi. pascal broke basic. popplers taste great.
cdaz vpi fng. basic breaks pascal. popplers punch hard. fng cdaz vpi.
```
...which contains two Martian paragraphs. The sentence `fng cdaz vpi.` appears twice, but that's perfectly fine.
***Not Martian essay***
```
popplers taste fng. cdaz vpi pascal. broke fng cdaz vpi.
pascal broke omicron planets. basic scares goats. vpi piv vpi.
```
...because the construct `fng. cdaz vpi pascal. broke fng cdaz vpi. [nl] pascal broke` is a contiguous word repetition.
# Challenge
Your challenge is to write a function or program that accepts no input, which produces as its output my homework; that is, your program should generate a **Martian essay** between 729 and 810 words (inclusive). Keep in mind, your program's output must be a valid Martian essay, but you don't have to generate it randomly or different each time. *Anything you do to generate a valid Martian essay* counts.
I've [written a C++ program to check essays](http://ideone.com/fork/34W8KI) that you're allowed to use.
This is code golf. Shortest code in bytes wins. Standard loopholes disallowed.
  
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~28 26 25 24~~ 23 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
-1 byte thanks to carusocomputing (replace the word `thimble` with `abcdefg`)
```
9ØaḣŒ!s²ḣµs9K€;€”.K;⁷µ€
```
**[TryItOnline!](http://jelly.tryitonline.net/#code=OcOYYeG4o8WSIXPCsuG4o8K1czlL4oKsO-KCrOKAnS5LO-KBt8K14oKs&input=)**
### How?
Makes a list of all `362880` permutations of the first ~~seven~~ nine letters of the English alphabet `abcdefghi`, which all have the properties of Martian words and are all distinct, and formats them into an essay using the first `729` words.
```
9ØaḣŒ!s²ḣµs9K€;€”.K;⁷µ€ - Main link: no arguments
9                       - 9 as x
         µ              - monadic chain separation
 Øa                     - yield lowercase alphabet
   ḣ                    - head to x ("abcdefghi")
    Œ!                  - all permutations (362880 distinct Martian words)
       ²                - square x = 81 
      s                 - split into chunks of length 81 (the paragraphs)
        ḣ               - head to x (get the first 9 paragraphs only)
                     µ€ - monadic chain for €ach (for each chunk:)
          s9            -     split into chunks of length 9 (the sentences)
            K€          -     join with spaces for €each (between words in each sentence)
              ;€        -     concatenate €ach with
                ”.      -         '.' (add a full stop* after each sentence)
                  K     -     join with spaces (add a space between the sentences)
                   ;    -     concatenate with
                    ⁷   -         a line feed
                        - implicit print
```
\* period
[Answer]
# [05AB1E](http://github.com/Adriandmen/05AB1E), ~~25~~ ~~24~~ ~~22~~ 20 bytes
*-2 bytes thanks to Emigna (Significant refactor, thanks man).*
```
A7£œJðý72ô€¨'.«9ô9£»
```
[Try it online!](http://05ab1e.tryitonline.net/#code=QTfCo8WTSsOww703MsO04oKswqgnLsKrOcO0OcKjwrs&input=)
```
A7£                     # Push first 7 letters of the alphabet.
   œJðý                 # All 5040 permutations of "abcdefg" joined by spaces.
       72ô              # Split into pieces of 72 (Sentences).
          €             # For each piece...
           ¨'.«         # Lop of the last char and concat a period.
               9ô       # Split into pieces of 9 (paragraphs).
                 9£     # Take only the first 9 paragraphs.
                   »    # Join by newlines and implicitly print.
```
Turns out the 810 word version is shorter than the 729 word version.
**Output:**
```
abcdefg abcdegf abcdfeg abcdfge abcdgef abcdgfe abcedfg abcedgf abcefdg. abcefgd abcegdf abcegfd abcfdeg abcfdge abcfedg abcfegd abcfgde abcfged. abcgdef abcgdfe abcgedf abcgefd abcgfde abcgfed abdcefg abdcegf abdcfeg. abdcfge abdcgef abdcgfe abdecfg abdecgf abdefcg abdefgc abdegcf abdegfc. abdfceg abdfcge abdfecg abdfegc abdfgce abdfgec abdgcef abdgcfe abdgecf. abdgefc abdgfce abdgfec abecdfg abecdgf abecfdg abecfgd abecgdf abecgfd. abedcfg abedcgf abedfcg abedfgc abedgcf abedgfc abefcdg abefcgd abefdcg. abefdgc abefgcd abefgdc abegcdf abegcfd abegdcf abegdfc abegfcd abegfdc. abfcdeg abfcdge abfcedg abfcegd abfcgde abfcged abfdceg abfdcge abfdecg.
abfdegc abfdgce abfdgec abfecdg abfecgd abfedcg abfedgc abfegcd abfegdc. abfgcde abfgced abfgdce abfgdec abfgecd abfgedc abgcdef abgcdfe abgcedf. abgcefd abgcfde abgcfed abgdcef abgdcfe abgdecf abgdefc abgdfce abgdfec. abgecdf abgecfd abgedcf abgedfc abgefcd abgefdc abgfcde abgfced abgfdce. abgfdec abgfecd abgfedc acbdefg acbdegf acbdfeg acbdfge acbdgef acbdgfe. acbedfg acbedgf acbefdg acbefgd acbegdf acbegfd acbfdeg acbfdge acbfedg. acbfegd acbfgde acbfged acbgdef acbgdfe acbgedf acbgefd acbgfde acbgfed. acdbefg acdbegf acdbfeg acdbfge acdbgef acdbgfe acdebfg acdebgf acdefbg. acdefgb acdegbf acdegfb acdfbeg acdfbge acdfebg acdfegb acdfgbe acdfgeb.
acdgbef acdgbfe acdgebf acdgefb acdgfbe acdgfeb acebdfg acebdgf acebfdg. acebfgd acebgdf acebgfd acedbfg acedbgf acedfbg acedfgb acedgbf acedgfb. acefbdg acefbgd acefdbg acefdgb acefgbd acefgdb acegbdf acegbfd acegdbf. acegdfb acegfbd acegfdb acfbdeg acfbdge acfbedg acfbegd acfbgde acfbged. acfdbeg acfdbge acfdebg acfdegb acfdgbe acfdgeb acfebdg acfebgd acfedbg. acfedgb acfegbd acfegdb acfgbde acfgbed acfgdbe acfgdeb acfgebd acfgedb. acgbdef acgbdfe acgbedf acgbefd acgbfde acgbfed acgdbef acgdbfe acgdebf. acgdefb acgdfbe acgdfeb acgebdf acgebfd acgedbf acgedfb acgefbd acgefdb. acgfbde acgfbed acgfdbe acgfdeb acgfebd acgfedb adbcefg adbcegf adbcfeg.
adbcfge adbcgef adbcgfe adbecfg adbecgf adbefcg adbefgc adbegcf adbegfc. adbfceg adbfcge adbfecg adbfegc adbfgce adbfgec adbgcef adbgcfe adbgecf. adbgefc adbgfce adbgfec adcbefg adcbegf adcbfeg adcbfge adcbgef adcbgfe. adcebfg adcebgf adcefbg adcefgb adcegbf adcegfb adcfbeg adcfbge adcfebg. adcfegb adcfgbe adcfgeb adcgbef adcgbfe adcgebf adcgefb adcgfbe adcgfeb. adebcfg adebcgf adebfcg adebfgc adebgcf adebgfc adecbfg adecbgf adecfbg. adecfgb adecgbf adecgfb adefbcg adefbgc adefcbg adefcgb adefgbc adefgcb. adegbcf adegbfc adegcbf adegcfb adegfbc adegfcb adfbceg adfbcge adfbecg. adfbegc adfbgce adfbgec adfcbeg adfcbge adfcebg adfcegb adfcgbe adfcgeb.
adfebcg adfebgc adfecbg adfecgb adfegbc adfegcb adfgbce adfgbec adfgcbe. adfgceb adfgebc adfgecb adgbcef adgbcfe adgbecf adgbefc adgbfce adgbfec. adgcbef adgcbfe adgcebf adgcefb adgcfbe adgcfeb adgebcf adgebfc adgecbf. adgecfb adgefbc adgefcb adgfbce adgfbec adgfcbe adgfceb adgfebc adgfecb. aebcdfg aebcdgf aebcfdg aebcfgd aebcgdf aebcgfd aebdcfg aebdcgf aebdfcg. aebdfgc aebdgcf aebdgfc aebfcdg aebfcgd aebfdcg aebfdgc aebfgcd aebfgdc. aebgcdf aebgcfd aebgdcf aebgdfc aebgfcd aebgfdc aecbdfg aecbdgf aecbfdg. aecbfgd aecbgdf aecbgfd aecdbfg aecdbgf aecdfbg aecdfgb aecdgbf aecdgfb. aecfbdg aecfbgd aecfdbg aecfdgb aecfgbd aecfgdb aecgbdf aecgbfd aecgdbf.
aecgdfb aecgfbd aecgfdb aedbcfg aedbcgf aedbfcg aedbfgc aedbgcf aedbgfc. aedcbfg aedcbgf aedcfbg aedcfgb aedcgbf aedcgfb aedfbcg aedfbgc aedfcbg. aedfcgb aedfgbc aedfgcb aedgbcf aedgbfc aedgcbf aedgcfb aedgfbc aedgfcb. aefbcdg aefbcgd aefbdcg aefbdgc aefbgcd aefbgdc aefcbdg aefcbgd aefcdbg. aefcdgb aefcgbd aefcgdb aefdbcg aefdbgc aefdcbg aefdcgb aefdgbc aefdgcb. aefgbcd aefgbdc aefgcbd aefgcdb aefgdbc aefgdcb aegbcdf aegbcfd aegbdcf. aegbdfc aegbfcd aegbfdc aegcbdf aegcbfd aegcdbf aegcdfb aegcfbd aegcfdb. aegdbcf aegdbfc aegdcbf aegdcfb aegdfbc aegdfcb aegfbcd aegfbdc aegfcbd. aegfcdb aegfdbc aegfdcb afbcdeg afbcdge afbcedg afbcegd afbcgde afbcged.
afbdceg afbdcge afbdecg afbdegc afbdgce afbdgec afbecdg afbecgd afbedcg. afbedgc afbegcd afbegdc afbgcde afbgced afbgdce afbgdec afbgecd afbgedc. afcbdeg afcbdge afcbedg afcbegd afcbgde afcbged afcdbeg afcdbge afcdebg. afcdegb afcdgbe afcdgeb afcebdg afcebgd afcedbg afcedgb afcegbd afcegdb. afcgbde afcgbed afcgdbe afcgdeb afcgebd afcgedb afdbceg afdbcge afdbecg. afdbegc afdbgce afdbgec afdcbeg afdcbge afdcebg afdcegb afdcgbe afdcgeb. afdebcg afdebgc afdecbg afdecgb afdegbc afdegcb afdgbce afdgbec afdgcbe. afdgceb afdgebc afdgecb afebcdg afebcgd afebdcg afebdgc afebgcd afebgdc. afecbdg afecbgd afecdbg afecdgb afecgbd afecgdb afedbcg afedbgc afedcbg.
afedcgb afedgbc afedgcb afegbcd afegbdc afegcbd afegcdb afegdbc afegdcb. afgbcde afgbced afgbdce afgbdec afgbecd afgbedc afgcbde afgcbed afgcdbe. afgcdeb afgcebd afgcedb afgdbce afgdbec afgdcbe afgdceb afgdebc afgdecb. afgebcd afgebdc afgecbd afgecdb afgedbc afgedcb agbcdef agbcdfe agbcedf. agbcefd agbcfde agbcfed agbdcef agbdcfe agbdecf agbdefc agbdfce agbdfec. agbecdf agbecfd agbedcf agbedfc agbefcd agbefdc agbfcde agbfced agbfdce. agbfdec agbfecd agbfedc agcbdef agcbdfe agcbedf agcbefd agcbfde agcbfed. agcdbef agcdbfe agcdebf agcdefb agcdfbe agcdfeb agcebdf agcebfd agcedbf. agcedfb agcefbd agcefdb agcfbde agcfbed agcfdbe agcfdeb agcfebd agcfedb.
agdbcef agdbcfe agdbecf agdbefc agdbfce agdbfec agdcbef agdcbfe agdcebf. agdcefb agdcfbe agdcfeb agdebcf agdebfc agdecbf agdecfb agdefbc agdefcb. agdfbce agdfbec agdfcbe agdfceb agdfebc agdfecb agebcdf agebcfd agebdcf. agebdfc agebfcd agebfdc agecbdf agecbfd agecdbf agecdfb agecfbd agecfdb. agedbcf agedbfc agedcbf agedcfb agedfbc agedfcb agefbcd agefbdc agefcbd. agefcdb agefdbc agefdcb agfbcde agfbced agfbdce agfbdec agfbecd agfbedc. agfcbde agfcbed agfcdbe agfcdeb agfcebd agfcedb agfdbce agfdbec agfdcbe. agfdceb agfdebc agfdecb agfebcd agfebdc agfecbd agfecdb agfedbc agfedcb. bacdefg bacdegf bacdfeg bacdfge bacdgef bacdgfe bacedfg bacedgf bacefdg.
```
[Answer]
# Ruby, ~~86 83 82~~ 79 bytes
```
(8019..8747).map{|x|$><<x.to_s(3).tr('012','abf')+(x%9>7?".\n":x%3>1?". ":" ")}
```
The trick: print all numbers between 102000000 and 102222222 in base 3
[Answer]
# Mathematica, 113 bytes
```
StringRiffle[(p=Partition)["ark"["bus","car"][[#]]&/@Differences@Array[ThueMorse,730],3]~p~3,n=".\n",". "," "]<>n
```
Unnamed function that produces a string as output; that string is a Martian essay where each sentence has three words and each paragraph has three sentences. (Its deterministic output is below.)
The core of the algorithm uses the cool mathematical fact that the [differences of the Thue–Morse sequence](https://en.wikipedia.org/wiki/Square-free_word#Examples) form an infinite sequence of the three symbols –1, 0, and 1 that has no contiguous digit repetitions. `Differences@Array[ThueMorse,730]` generates that sequence, to length 729.
Then `"ark"["bus","car"][[#]]&/@` is applied to this sequence; this converts each 1 to "bus" (the first argument), each –1 to "car" (the last argument), and each 0 to "ark" (the function head). `(p=Partition)[...,3]~p~3` divides this sequence of words into nested lists, each consisting of three lists of three words each. Finally, `StringRiffle[...,n=".\n",". "," "]` concatenates all the words together, with different separators depending on the list levels; and `<>n` appends the final period and newline.
The output sure doesn't look repetition-free....
```
ark car bus. car ark bus. ark car ark.
bus car bus. ark car bus. car ark bus.
car bus ark. car ark bus. ark car bus.
car ark bus. ark car ark. bus car bus.
ark car ark. bus ark car. bus car ark.
bus car bus. ark car bus. car ark bus.
ark car ark. bus car bus. ark car bus.
car ark bus. car bus ark. car ark bus.
ark car bus. car ark bus. car bus ark.
car bus car. ark bus ark. car ark bus.
car bus ark. car ark bus. ark car bus.
car ark bus. ark car ark. bus car bus.
ark car bus. car ark bus. car bus ark.
car ark bus. ark car bus. car ark bus.
ark car ark. bus car bus. ark car ark.
bus ark car. bus car ark. bus car bus.
ark car bus. car ark bus. ark car ark.
bus car bus. ark car ark. bus ark car.
bus car ark. bus ark car. ark bus car.
bus ark car. bus car ark. bus car bus.
ark car ark. bus ark car. bus car ark.
bus car bus. ark car bus. car ark bus.
ark car ark. bus car bus. ark car bus.
car ark bus. car bus ark. car ark bus.
ark car bus. car ark bus. ark car ark.
bus car bus. ark car ark. bus ark car.
bus car ark. bus car bus. ark car bus.
car ark bus. ark car ark. bus car bus.
ark car bus. car ark bus. car bus ark.
car ark bus. ark car bus. car ark bus.
car bus ark. car bus car. ark bus ark.
car ark bus. car bus ark. car ark bus.
ark car bus. car ark bus. ark car ark.
bus car bus. ark car bus. car ark bus.
car bus ark. car ark bus. ark car bus.
car ark bus. car bus ark. car bus car.
ark bus ark. car ark bus. car bus ark.
car bus car. ark bus car. bus ark car.
ark bus ark. car bus car. ark bus ark.
car ark bus. car bus ark. car ark bus.
ark car bus. car ark bus. car bus ark.
car bus car. ark bus ark. car ark bus.
car bus ark. car ark bus. ark car bus.
car ark bus. ark car ark. bus car bus.
ark car bus. car ark bus. car bus ark.
car ark bus. ark car bus. car ark bus.
ark car ark. bus car bus. ark car ark.
bus ark car. bus car ark. bus car bus.
ark car bus. car ark bus. ark car ark.
bus car bus. ark car bus. car ark bus.
car bus ark. car ark bus. ark car bus.
car ark bus. car bus ark. car bus car.
ark bus ark. car ark bus. car bus ark.
car ark bus. ark car bus. car ark bus.
ark car ark. bus car bus. ark car bus.
car ark bus. car bus ark. car ark bus.
ark car bus. car ark bus. ark car ark.
bus car bus. ark car ark. bus ark car.
bus car ark. bus car bus. ark car bus.
car ark bus. ark car ark. bus car bus.
ark car ark. bus ark car. bus car ark.
bus ark car. ark bus car. bus ark car.
bus car ark. bus car bus. ark car ark.
bus ark car. bus car ark. bus car bus.
ark car bus. car ark bus. ark car ark.
bus car bus. ark car bus. car ark bus.
car bus ark. car ark bus. ark car bus.
car ark bus. ark car ark. bus car bus.
ark car ark. bus ark car. bus car ark.
bus car bus. ark car bus. car ark bus.
ark car ark. bus car bus. ark car ark.
bus ark car. bus car ark. bus ark car.
ark bus car. bus ark car. bus car ark.
bus car bus. ark car ark. bus ark car.
bus car ark. bus ark car. ark bus car.
bus ark car. ark bus ark. car bus car.
ark bus car. bus ark car. bus car ark.
bus ark car. ark bus car. bus ark car.
bus car ark. bus car bus. ark car ark.
bus ark car. bus car ark. bus car bus.
ark car bus. car ark bus. ark car ark.
```
# Mathematica, 100 bytes
```
StringRiffle[(p=Partition)[Permutations@Characters@"thimble"~Take~729,9]~p~9,n=".\n",". "," ",""]<>n
```
A direct port of Jonathan Allen's Jelly algorithm.
[Answer]
# [Python 3](https://docs.python.org/3/), ~~121 119~~ 114 bytes
-5 thanks to [Jitse](https://codegolf.stackexchange.com/users/87681)!
```
from itertools import*
i=729
while i:i-=1;print(*[*permutations('thimble')][i],sep='',end='.'[i%9:]+' \n'[i%81<1])
```
**[Try it online!](https://tio.run/##FcZBDsIgEADAe1/BxWyL1QQ9aKu8BDloXMMmwBJYY3w9xjlN@UrgfOz9VTkpEqzCHJuiVLiKHsieDsvwCRRR0Uo7ay6lUpZRO12wprfchTi3ESRQekSEyTvyc8NiAWbMTwt7cLRZVr8Fdcv/n83V@Kn3Hw "Python 3 – Try It Online")**
### How?
Counts down from `i=729` and gets a list of the letters of the ith permutation of `'thimble'` as the next distinct Martian word (`list(permutations('thimble'))[i]`).
Avoids `''.join(...)` by use of a `*expression` to unpack the list while changing the default separator for `print` from a space to the empty string (`sep=''`).
Uses the `end` argument of `print` to optionally add spaces, full stops and line feeds as required using modular arithmetic. A full stop goes after every ninth word (`'.'*(i%9<1)`) and a line feed goes after every eighty-first word, otherwise a space does, achieved by indexing into a two character string (`' \n'[i%81<1]`).
[Answer]
# PHP, 86 bytes
```
for(;$i<729;$$s="")echo${$s=str_shuffle(abcdefg)}??$s.(++$i%3?"":".").($i%9?" ":"\n");
```
Generates a randomised 729 word essay that repeats no words.  
Use like:
```
php -r 'for(;$i<729;$$s="")echo${$s=str_shuffle(abcdefg)}??$s.(++$i%3?"":".").($i%9?" ":"\n");'
```
Explanation:
```
for(;$i<729;                                      # until we've generated 729 words
  $$s="")                                         # assign a blank string to the variable for the previous word
    echo ${$s=str_shuffle(abcdefg)}??             # generate a random word and if the variable for it has been assigned echo that variable (a blank string)
         $s.(++$i%3?"":".").($i%9?" ":"\n");      # otherwise echo the string and punctuation based on the word number (which is incremented here)
```
[Answer]
# ///, 95 bytes
```
/_/abf//-/_ _a _e _i _m _n _o _u _aa.//'/- b- c- d- g- j- p- t- bb-/'
f'
h'
l'
r'
s'
v'
z'
ff'
```
*(additional new line at the end, not visible here)*
**[Try it online!](http://slashes.tryitonline.net/#code=L18vYWJmLy8tL18gX2EgX2UgX2kgX20gX24gX28gX3UgX2FhLi8vJy8tIGItIGMtIGQtIGctIGotIHAtIHQtIGJiLS8nCmYnCmgnCmwnCnInCnMnCnYnCnonCmZmJwo&input=)**
**Essay:**
```
abf abfa abfe abfi abfm abfn abfo abfu abfaa. babf abfa abfe abfi abfm abfn abfo abfu abfaa. cabf abfa abfe abfi abfm abfn abfo abfu abfaa. dabf abfa abfe abfi abfm abfn abfo abfu abfaa. gabf abfa abfe abfi abfm abfn abfo abfu abfaa. jabf abfa abfe abfi abfm abfn abfo abfu abfaa. pabf abfa abfe abfi abfm abfn abfo abfu abfaa. tabf abfa abfe abfi abfm abfn abfo abfu abfaa. bbabf abfa abfe abfi abfm abfn abfo abfu abfaa.
fabf abfa abfe abfi abfm abfn abfo abfu abfaa. babf abfa abfe abfi abfm abfn abfo abfu abfaa. cabf abfa abfe abfi abfm abfn abfo abfu abfaa. dabf abfa abfe abfi abfm abfn abfo abfu abfaa. gabf abfa abfe abfi abfm abfn abfo abfu abfaa. jabf abfa abfe abfi abfm abfn abfo abfu abfaa. pabf abfa abfe abfi abfm abfn abfo abfu abfaa. tabf abfa abfe abfi abfm abfn abfo abfu abfaa. bbabf abfa abfe abfi abfm abfn abfo abfu abfaa.
habf abfa abfe abfi abfm abfn abfo abfu abfaa. babf abfa abfe abfi abfm abfn abfo abfu abfaa. cabf abfa abfe abfi abfm abfn abfo abfu abfaa. dabf abfa abfe abfi abfm abfn abfo abfu abfaa. gabf abfa abfe abfi abfm abfn abfo abfu abfaa. jabf abfa abfe abfi abfm abfn abfo abfu abfaa. pabf abfa abfe abfi abfm abfn abfo abfu abfaa. tabf abfa abfe abfi abfm abfn abfo abfu abfaa. bbabf abfa abfe abfi abfm abfn abfo abfu abfaa.
labf abfa abfe abfi abfm abfn abfo abfu abfaa. babf abfa abfe abfi abfm abfn abfo abfu abfaa. cabf abfa abfe abfi abfm abfn abfo abfu abfaa. dabf abfa abfe abfi abfm abfn abfo abfu abfaa. gabf abfa abfe abfi abfm abfn abfo abfu abfaa. jabf abfa abfe abfi abfm abfn abfo abfu abfaa. pabf abfa abfe abfi abfm abfn abfo abfu abfaa. tabf abfa abfe abfi abfm abfn abfo abfu abfaa. bbabf abfa abfe abfi abfm abfn abfo abfu abfaa.
rabf abfa abfe abfi abfm abfn abfo abfu abfaa. babf abfa abfe abfi abfm abfn abfo abfu abfaa. cabf abfa abfe abfi abfm abfn abfo abfu abfaa. dabf abfa abfe abfi abfm abfn abfo abfu abfaa. gabf abfa abfe abfi abfm abfn abfo abfu abfaa. jabf abfa abfe abfi abfm abfn abfo abfu abfaa. pabf abfa abfe abfi abfm abfn abfo abfu abfaa. tabf abfa abfe abfi abfm abfn abfo abfu abfaa. bbabf abfa abfe abfi abfm abfn abfo abfu abfaa.
sabf abfa abfe abfi abfm abfn abfo abfu abfaa. babf abfa abfe abfi abfm abfn abfo abfu abfaa. cabf abfa abfe abfi abfm abfn abfo abfu abfaa. dabf abfa abfe abfi abfm abfn abfo abfu abfaa. gabf abfa abfe abfi abfm abfn abfo abfu abfaa. jabf abfa abfe abfi abfm abfn abfo abfu abfaa. pabf abfa abfe abfi abfm abfn abfo abfu abfaa. tabf abfa abfe abfi abfm abfn abfo abfu abfaa. bbabf abfa abfe abfi abfm abfn abfo abfu abfaa.
vabf abfa abfe abfi abfm abfn abfo abfu abfaa. babf abfa abfe abfi abfm abfn abfo abfu abfaa. cabf abfa abfe abfi abfm abfn abfo abfu abfaa. dabf abfa abfe abfi abfm abfn abfo abfu abfaa. gabf abfa abfe abfi abfm abfn abfo abfu abfaa. jabf abfa abfe abfi abfm abfn abfo abfu abfaa. pabf abfa abfe abfi abfm abfn abfo abfu abfaa. tabf abfa abfe abfi abfm abfn abfo abfu abfaa. bbabf abfa abfe abfi abfm abfn abfo abfu abfaa.
zabf abfa abfe abfi abfm abfn abfo abfu abfaa. babf abfa abfe abfi abfm abfn abfo abfu abfaa. cabf abfa abfe abfi abfm abfn abfo abfu abfaa. dabf abfa abfe abfi abfm abfn abfo abfu abfaa. gabf abfa abfe abfi abfm abfn abfo abfu abfaa. jabf abfa abfe abfi abfm abfn abfo abfu abfaa. pabf abfa abfe abfi abfm abfn abfo abfu abfaa. tabf abfa abfe abfi abfm abfn abfo abfu abfaa. bbabf abfa abfe abfi abfm abfn abfo abfu abfaa.
ffabf abfa abfe abfi abfm abfn abfo abfu abfaa. babf abfa abfe abfi abfm abfn abfo abfu abfaa. cabf abfa abfe abfi abfm abfn abfo abfu abfaa. dabf abfa abfe abfi abfm abfn abfo abfu abfaa. gabf abfa abfe abfi abfm abfn abfo abfu abfaa. jabf abfa abfe abfi abfm abfn abfo abfu abfaa. pabf abfa abfe abfi abfm abfn abfo abfu abfaa. tabf abfa abfe abfi abfm abfn abfo abfu abfaa. bbabf abfa abfe abfi abfm abfn abfo abfu abfaa.
```
[Answer]
## JavaScript (ES6), 130 bytes
This essay contains 774 Martian words, from a dictionary of 308 distinct words, made of all Martian letters.
```
_=>[...Array(2322)].map((_,i)=>['aeimnou','bcdgkpt','fhlrsvz'][i%3][(z=z*71%1e9)%7]+(++i%3?'':i%9?' ':i%27?'. ':`.
`),z=1).join``
```
Letters are picked in a pseudo-random manner, using the following formula:
```
(71^n mod 1000000000) mod 7
```
Where `71` is the smallest prime [1] for which no contiguous word repetition appear with this modulo.
```
let f =
_=>[...Array(2322)].map((_,i)=>['aeimnou','bcdgkpt','fhlrsvz'][i%3][(z=z*71%1e9)%7]+(++i%3?'':i%9?' ':i%27?'. ':`.
`),z=1).join``
console.log(f());
```
---
*[1] I only tested primes at the time I wrote this code. The smallest non-prime candidate is `56`.*
[Answer]
# Python 3, ~~404~~ ~~270~~ ~~332~~ ~~339~~ ~~285~~ ~~266~~ 259 bytes
This is an attempt to create a random Martian essay my randomly sampling the Martian alphabet and checking afterwards which words work.
**Edit:** -10 bytes from Zachary T's suggestion to use `R=range`. -9 bytes from changing `.intersection(w)` to `&set(w)`. -7 bytes from changing `A[random.randrange(21)]` to `random.choice(A)`.
```
import random
W=[];A="abfechidlmgrnksopvutz";R=range
while len(W)<729:W+=[''.join(random.choice(A)for j in R(9))for i in R(729)];W=[*set(w for w in W if all(set(A[z::3])&set(w)for z in R(3)))]
for j in R(9):print(" ".join(W[81*j+i]+"."*(i%9>7)for i in R(81)))
```
**Ungolfing**
```
import random
word_list = []
alphabet = "abfechidlmgrnksopvutz"
while len(word_list) < 729:
    # generates words
    for i in range(729):
        word = ""
        for j in range(9):
            word += alphabet[random.randrange(21)]
        word_list.append(word)
    # removes invalid words that don't have at least one letter of each letter type
    kept_words = []
    for word in word_list:
        all_letter_types = [0, 0, 0]
        for z in range(3):
            all_letter_types[z] = set(alphabet[z::3]) & set(word)
        if all(all_letter_types):
            kept_words.append(word)
    word_list = kept_words[:]
    # removes any contiguous word repetitions by removing all repeated words
    word_list = list(set(word_list))
# attaches punctuation and prints
for j in range(9):
    result = []
    for i in range(81):
        word = word_list[81*j+i]
        if i%9 == 8:
            word += "."
    print(" ".join(result))
```
[Answer]
# [Husk](https://github.com/barbuz/Husk), ~~19~~ 18 bytes
```
↑9C9mo`:'.wC9P…"ag
```
[Try it online!](https://tio.run/##yygtzv7//1HbREtny9z8BCt1vXJny4BHDcuUEtP//wcA "Husk – Try It Online")
729 words, using the same idea as the 05AB1E answer.
-1 byte from Dominic Van Essen.
[Answer]
# [Zsh](https://www.zsh.org/) `-P`, 51 bytes
```
x=(a e i m n o u)
echo $x{f,h,l,r,s}$x{b,d,g.}|fold
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m724qjhjWbSSboBS7EKNpaUlaboWN40rbDUSFVIVMhVyFfIU8hVKNblSkzPyFVQqqtN0MnRydIp0imuBnCSdFJ10vdqatPycFIjWjZo1JampCnYa5ckKuuV2akaaEPEFCyA0AA)
The output has some trailing spaces, which I think are normally allowed, but if not, this can be fixed by adding `|cut -c-79` (+10 bytes).
## Explanation
The basic idea is to generate a number of unique Martian words, then group them into sentences and paragraphs.
I used 4-letter words of the format `vsvh` (vowel, soft consonant, vowel, hard consonant), because it makes it possible to get enough words using just one cartesian product. (This is what the `{,,,}` expansions do; the `-P` option to Zsh also enables that multiplying behaviour for array variables, allowing us to reuse `$x`).
There are enough unique 3-letter words to meet the word count, but they would require multiple separate expansions - one single format (e.g. `vsh`) can only produce \$ 7^3 = 343 \$ words. This would take too many extra bytes.
Then, by adding a `.` to one of the letters, we can ensure there are regular sentence breaks - here, it's every time `g` comes around in the cartesian product.
Finally, piping this all to `fold` inserts line breaks, to keep the paragraphs under 10 sentences each.
The fact that this all works, and can be so short, is slightly miraculous. It relies on some very specific mathematical properties: by having \$ x = 7 \$ vowels, \$ y = 5 \$ soft consonants, and \$ z = 3 \$ hard consonants, we ensure:
* \$ 729 \le xyxz \le 810 \$, so our essay meets the word count
* \$ z \ge 3 \$, so each sentence has enough words in it (remember one of the hard consonants has a `.` at the end)
* \$ 80 \div (5z+1) \in \mathbb Z \cap [3, 9] \$, so the `fold` command, which defaults to wrapping every 80 characters, will break the essay up into paragraphs with a valid integer number of sentences
* \$ xyxz \equiv 0 \mod (80 \div (5z+1))z \$, so the last paragraph doesn't have any remainder sentences
Any of the issues above could be worked around, of course, but that would cost extra bytes. \$ 7, 5, 3 \$ is actually [the only choice that works perfectly](https://ato.pxeger.com/run?1=ZZDRasJAEEXpa7_igghJjJg0iFFMX_obfZnqbBKIk7BZJcmv9MWX9qP6Nd012iIuLDt7Zu5luJ_fTW-KWs7nr6NR8_Tn6U3VGh1KgSbJ2YtDpP7mGQ73j_jCh3-e3DhKhdXLGtsMXdAHXTC4Mo0jkOyRRlgs4C2DYRb7d-o4GuVAhex-bsTW92KIqZvIEOF9bNjjVv_rvWZINsAEnikYFbUGDWnKNTUFdiQo6MQg7EulWLMYyPHwwRq1Qmu_LDtuQ1CLqpbcvdZHW4W7BhU7x-S6FRpdivG6sA8Hf8zyGukt2l8)!
[Answer]
# [K (ngn/k)](https://codeberg.org/ngn/k), ~~167~~ ~~148~~ ~~145~~ 144 bytes
```
{("\n"/(" "/'(" "/''$(729>#,//){x,,(3+*1?7){l:3+*1?7;x,,`$(-#:'w)?'w:(,/'+l?'0 7 14_c),'(l?7)?\:c:"aeimnoubcdgkptfhlrsvz"}/()}/()),''".")),"\n"}
```
[Try it online!](https://ngn.bitbucket.io/k#eJwlTtsKgkAUfPcrlqNwzubWagXSCdoPyciyrGiz6Ka0+O+t+DAXhhmYih1BXoMmEKBxYIxcNl2sQqV127lWKZrFo9Rk0lke3NKHRUTjkLGRBhsmpTG2BhORiXS+LaVCsn5hci4ZdsfLrb5/9uXhdH28q7N9vr4/6DTJHr6LMAGv/ZMuCAqRsKjWmz/JmyfR)
Stitches together a random character of each type, appending an additional 0-6 random characters to form words of length 3-9, which are then shuffled. Sentences are formed from 3-9 of these words, and paragraphs from 3-9 of those sentences.
Paragraphs are iteratively appended, with the essay being complete when it contains at least 729 words. Since a valid paragraph can only contain up to 81 words (9 words per sentence \* 9 sentences), it's safe to write another paragraph as long as the essay contains less than 729 words.
However, proofreading the essay to ensure there is no contiguous word repetition is an exercise left to the reader.
```
{("\n"/                                /join each paragraph with a newline
  (" "/'                               /join sentences in a paragraph with a space
   (" "/''$                            /join words in a sentence with a space (converting words from symbols to strings)
    (729>#,//){                        /while the essay contains less than 729 words...
     x,,                                /append another paragraph of...
     (3+*1?7){                          /3 to 9 (randomly chosen) sentences each containing...
      l:3+*1?7;                         /3 to 9 (randomly chosen) words
      x,,`$                             /append the new sentence (casted to symbols), which is made of l words, each being a...
      (-#:'w)?'                         /randomly shuffled string of...
      w:(,/'+l?'0 7 14_c)               /a random character from each character type in the Martian alphabet
      ,'                                /concatenated with...
      (l?7)?\:c:"aeimnoubcdgkptfhlrsvz" /0 to 6 random characters from the Martian alphabet
     }/()
    }/()
   )
   ,''"."                               /finish each sentence with a period
  )
 )
 ,"\n"                                  /finish the essay with a newline
}
```
[Answer]
# [CJam](https://sourceforge.net/p/cjam), 26 bytes
```
'h,97>e!".
"{9/Sf*Uf+}fU9<
```
[Try it online!](https://tio.run/##S85KzP3/Xz1Dx9LcLlVRSY9LqdpSPzhNKzRNuzYt1NLm/38A "CJam – Try It Online")
First solution in a while where I've had to use a literal newline. Same idea as the 05AB1E answer.
*sigh* And if only concatenation was commutative...
]