Develop melodies according to the outlined musical structure, including the given motif.
X:1
L:1/8
Q:1/8=180
M:4/4
K:G
['d2 ed', 'fg a3'  
X:1
L:1/8
Q:1/8=180
M:4/4
K:G
 fe | d2 ed cAGE | A3 G AB (3cBA | d2 ed dcAG | DGGF GGAG | (3FGA EF DEFG | AAdc defg | 
 a2 ge fded | fdAF G2 :| fg | a3 b agfg | a2 af g2 fg | adba agfe | defd g2 fg | a3 g ffed | 
 dAAA f3 g | a2 ge fded | fdAF G2 :|  