Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:3/4
K:G
['B3 cBA G2 B2 d2']  
X:1
L:1/8
M:3/4
K:G
 B3 cBA | G2 B2 d2 | ^cdedcB | ABAGFD | B3 cBA | G2 B2 d2 | ^cded=cB | B4 A2 ::  