Formulate melodies by adhering to the specified pattern and supplied motif.
X:1
L:1/8
M:4/4
K:G
['DG (3GFG Bd d2 dedB', 'AGEG d g3 b g3 dBBA'  
X:1
L:1/8
M:4/4
K:G
|: DG (3GFG Bd d2 | dedB gedB | G2 BG dGBG | c2 Bc AGEG | DG (3GFG Bd d2 | dedB d2 gf | 
 (3ege ed Bdef | gedB AGEG :: d g3 b g3 | dBBA Bdef | g2 bg abge | (3ded BG AGEG | d g3 b g3 | 
 dBBA B2 gf | (3ege ed Bdef | gedB AGEG :|  