Compose a musical piece in accordance with the outlined theme and structure.
X:1
L:1/8
M:2/4
K:D
['A B2 c B A2 AB/c/ dcdA', 'defg agfe f2'  
X:1
L:1/8
M:2/4
K:D
 A | B2 c B | A2 AB/c/ | dcdA | GFDE | FG Af/d/ | cAGA | F2 DD | D3 || AB/c/ | defg | agfa | gfga | 
 gfdA | defg | agfe | f2 dd | defg | agfe | f2 ed | cAde | f2 ed | cAGF | GBAG | F2 DD | D3 ||  