Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:2/4
K:G
['DBBA AG G2 DGFG B2 A z']  
X:1
L:1/8
M:2/4
K:G
 DBBA | AG G2 | DGFG | B2 A z | Aced | dc c2 | ABcF | A2 G z |]  