Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:4/4
K:C
['gd dB dc c/B/c', 'G/F/G/A/ B/A/B/c/ d/e/d/c/ BB c/d/c/B/'  
X:1
L:1/8
M:4/4
K:C
 a a!p! a ug ave ad ue f e16 e f ud e.g | .G3 A B3 c | d3 c B2 B2 |[M:2/4][K:G][Q:1/8=100] d | 
 gd dB | dc c/B/c | cA A/G/A | BG G/F/G | gd dB | dc c/B/c | cA/G/ F/G/A/B/ | GBG :| D | 
 G/F/G/A/ B/A/B/c/ | d/e/d/c/ BB | c/d/c/B/ AA | B/c/B/A/ GD | G/F/G/A/ B/A/B/c/ | d/e/d/c/ BB | 
 c/d/c/B/ A/c/B/A/ | GBG :|  