Design melodies following the assigned musical pattern while integrating the provided thematic element.
X:1
L:1/8
M:6/8
K:D
['D2 (3E/F/G/ A2 B', 'D3 d2 (3e/f/g/ a2 g fdf ecA'  
X:1
L:1/8
M:6/8
K:D
 D2 (3E/F/G/ A2 B | ABG FED | D2 (3E/F/G A2 g | fdf ecA | D2 (3E/F/G/ A2 B | AFA EFG | FAd Bcd | 
 FGE D3 :: d2 (3e/f/g/ a2 g | fdf ecA | Bcd AFd | GAF E2 G/F/E/ | D2 (3E/F/G/ A2 g | afa gec | 
 dfd Bcd | FGE D3 :|  