Construct melodies utilizing the provided motif and adhere to the outlined musical structure.
X:1
L:1/8
Q:1/8=160
M:6/8
K:D
['D>ED D2 d AFA AFA BdB AFA', 'ede fdB'  
X:1
L:1/8
Q:1/8=160
M:6/8
K:D
"^allegro" F/E/ | D>ED D2 d | AFA AFA | BdB AFA | EFE EFE | D>ED D2 d | AFA AFA | BdB AFA | 
 EFE D2 :| f/g/ | a3 b3 | a>ba afd | gag faf | ede fdB | a3 f3 | ede fdB | AFA dAF | D>ED D2 :|  