Formulate melodies by adhering to the specified pattern and supplied motif.
X:1
L:1/8
M:2/2
K:D
['dDDF EDB,D dDDf gfef |1 g2 (fg)', 'bdad gafg edef |1 dBAG (Ad) d2'  
X:1
L:1/8
M:2/2
K:D
|: dDDF EDB,D | dDDf gfef |1 g2 (fg) edef | (dA) (3(Bcd) AFFA :|2 fdeB dFEF | 
 (3(DED) (DA,) (B,D) D2 |: d2 (ef) gfeg | fdad bdad | gafg edef |1 dBAG (Ad) d2 :|2 
 (dA) (3(Bcd) AFFA |]  