Formulate melodies by adhering to the specified pattern and supplied motif.
X:1
L:1/8
M:2/2
K:D
['d2 AG F2 f2', 'A4 A2 Bc d2 B2 AFED A4'  
X:1
L:1/8
M:2/2
K:D
 d2 AG F2 f2 | (d>cB>A) (e>cB>A) | d2 AG F2 f2 | cBA^G A4 :: A2 Bc d2 B2 | AFED A4 | BG e2 AF d2 | 
 Egfc | d4 :|  