Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:4/4
K:D
['B2 ef', 'G2 dB'  
X:1
L:1/8
M:4/4
K:D
|: Ac | dAa^g a=gfe | defd B2 ef | gAgd gfed | ceae c2 fg | afab a2 ge | d2 fd B2 ef | gega g2 fd | 
 ceae d2 :: AG | F2 dA FA d2 | G2 dB G2 dB | c2 ae ce a2 | dfaf gecA | F/F/A dA F/F/D Fd | 
 G/G/B dB G/G/D Gd | c/c/e Ae c/c/e aA | d2 c2 d2 :|  