Produce melodies that respect the given musical schema, and integrate the assigned motif.
X:1
L:1/4
M:3/4
K:D
['e f2 e', 'A ^G A', 'g z'  
X:1
L:1/4
M:3/4
K:D
"D" A3 |"G" B3 |"D" A2 d | f2 z | A2 f |"G" B2 g |"D" A2 f | d c d |"A7" e3 | e ^d e |"D" f3 | 
 f g ^g | a d e |"A7" f2 e |"D" d3 |[K:A] d z z |:"A"{/^d} e{/^d} e{/^d} e | f2 e | 
{/^d} e{/^d} e{/^d} e | f2 e |"E7" f z f | z e d |1"A" c z c | z B A :|2"A" c3/2 A/ A | A z z || 
[K:D]"D"{/B} A ^G A |{/B} A ^G A |"G" B2 A | G2 z |"A7"{/A} G F G |{/A} G F G |"D" A2 G | F2 z | 
{/B} A ^G A |{/B} A ^G A |"G" g2 f | f2 d |"A7"{/d} c"_c" ^B c | A f e |"D" d3 | d z B |: 
[K:G]"G" d3 | d"_c" c B |"D7" A3 | z2"_c" c | e3 | e d"_c" c |"G" (B3 | B) z G |"C" g3 | g f e | 
"G" d3 | ^d e3/2 B/ |"D""_c" c3 | ^c d3/2 F/ |"G" G3/2 g/ g |1 g z B :|2 g z z |]  