Composition exercise by the Polish composer Karol Szymanowski(1882-1937) given to his student.
It goes as follows:
16 bars divided into 4x4 bar segments
Tonic chord at the beginning
At bars 7/8 modulate to dominant(in major) or relative major(in minor)
In bars 9/10 write a sequence
In bars 11/12 write another sequence
In bars 13/14 thematic return should occur
In bar 16 coda
And at the bottom: "best subdominant, dominant and tonic, perfect cadence."
I recommend giving it a try.