Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:4/4
K:D
['AD D2', '(3EFG E2 =cE dE=cE', 'A3 d B3'  
X:1
L:1/8
M:4/4
K:D
 AD D2 ADBD | AD D2 G2 (3EFG | AD D2 BG G2 | BdcA G2 (3EFG | AD D2 ADBD | AD D2 G2 (3EFG | 
 AD D2 BdcA | BdcA G2 (3EFG || E2 =cE dE=cE | E2 =cA G2 (3EFG | E2 =cE dE=cE | BdcA G2 (3EFG | 
 E2 =cE dE=cE | E2 =cA G2 FG | Ad d2 dcAc | dcAF G2 (3EFG || A3 d B3 d | ABAF G2 FG | A3 d B3 A | 
 GBdB GBdB | A3 d B3 d | ABAF G2 (3EFG | Ad d2 dcAc | dcAF G2 FG ||  