Formulate melodies by adhering to the specified pattern and supplied motif.
X:1
L:1/8
M:4/4
K:D
['D2 (3FED ADFA', 'D2 dcdB AF F2 DFBF AFEF dcdB'  
X:1
L:1/8
M:4/4
K:D
|: D2 (3FED ADFA | Ad d2 Adfd | D2 (3FED ADFA | dBcA BFAF | D2 (3FED ADFA | Ad d2 defg | 
 afge fdec | dBAG FD D2 :: dcdB AF F2 | DFBF AFEF | dcdB ADFA | BF F2 GFEF | d2 cd (3Bcd AF | 
 Addc defg | afge fdec | dBAG FD D2 :|  