Create harmonious melodies following the given letter notation and incorporating the designated theme.
X:1
L:1/8
M:4/4
K:D
['e2 (fg) B2']  
X:1
L:1/8
M:4/4
K:D
 (A>B) | d2 (Aa) f2 (ed) | e2 (fg) B2 (e>d) | c2 (BA) g2 (ec) | d2 (ef) A2 (A>B) | 
 d2 (Aa) f2 (ed) | e2 (fg) B2 (e>d) | c2 (BA) g2 (ec) | d2 d2 d2 f>g | a2 (fd) Aa fg | 
 e2 (fg) B2 (e>f) | g2 (ec) Ag ec | d2 (ef) A2 (f>g) | a2 (fd) Aa fd | e2 (fg) B2 (e>d) | 
 c2 (BA) g2 (ec) | d2 d2 d2 z2 |]  