Compose melodies adhering to the given motif and the outlined musical structure.
X:1
L:1/8
M:4/4
K:D
['DFAB B2 AB', 'edBA d2 df eA A2 defg afef'  
X:1
L:1/8
M:4/4
K:D
 DFAB B2 AB | d2 fd edBd | DFAB B2 AB | dgfd edBA | DFAB B2 AB | d2 fd edBd | faaf g2 fe | 
 dgfd edBA :: d2 df eA A2 | defg afef | dgfd eB B2 | gB B2 dBAB | d2 fd edfd | Adfd edBA | 
 ABdf afbf | afeg fddA :|  