Construct melodies utilizing the provided motif and adhere to the outlined musical structure.
X:1
L:1/8
Q:1/8=180
M:4/4
K:D
['A2 Bc dBcA BGAF EFGA', 'faaf g2 ef'  
X:1
L:1/8
Q:1/8=180
M:4/4
K:D
 dB | ADAD ADBD | AD (3DED AD (3FGA | BEE/D/E BEcE | BEE/D/E BAFA |"^5" dcdf ecdB | AFDF A2 Bc | 
 dBcA BGAF | EFGA BcdB |"^9" ADAF ADBD | ADD/E/D AG (3FGA | B2 (3FGA c2 (3FGA | d2 (3FGA BAFA | 
"^13" dgfd ecdF | A2 FA A2 Bc | dBcA BGAF | EFGA Bcd || g |"^17" fAdg (3fgf dg | fAdg faaf | 
 g2 ef ggge | dged BAFA |"^21" dcdf ecdB | AF F2 ABdg | (3fga ec dBAF | EFGA Bcdg | 
"^25" (3fgf dg aafd | Adfd faaf | g2 ef ggga | b2 ba bgeg |"^29" b2 bc' d'3 f | (3gfe dB ABdf | 
 afec dBAF | EFGA BcdB ||  