Construct melodies utilizing the provided motif and adhere to the outlined musical structure.
X:1
L:1/8
Q:3/8=120
M:6/8
K:D
['a a2 f d2 d e2 c', 'e a^gf edc Bba ^gfe'  
X:1
L:1/8
Q:3/8=120
M:6/8
K:D
 a | a2 f d2 d | e2 c A2 A | ABc def | g2 f e2 a | a2 f d2 d | e2 c A2 A | Bgf edc | dAF D2 :: e | 
 a^gf edc | Bba ^gfe | aed cBA | e3 E2 e | a^gf edc | Bba ^gfe | aef dBe | A3 A2 :|  