Craft a musical piece that abides by the prescribed structural guidelines and the given theme.
X:1
L:1/8
M:4/4
K:D
['dD (3DDD', 'd2 ef gfeg fdad bdad g2 fg'  
X:1
L:1/8
M:4/4
K:D
|: dD (3DDD EDB,D | dD (3DDD gfef | g2 fg edef | cA (3Bcd AFFA | dD (3DDD EDB,D | d2 ef gfeg | 
 fdec dAFD | (3EFE DB, A,B, D2 :: d2 ef gfeg | fdad bdad | g2 fg edef | dBAF AddA | d2 ef gfeg | 
 fdad bdad | g2 fg edef | dBAF Adde :|  