Compose a piece of music based on the provided motif and adhering to the outlined musical structure.
X:1
L:1/8
M:2/4
K:D
['A>B AF Ad fd'  
X:1
L:1/8
M:2/4
K:D
"D" A>B AF | Ad fd |"G" Be/f/ ge |"A" dc"A7" BA |"D" A>B AF | Ad fd |"^em" B>g"A7" ec |"D" dA D2 :| 
"D" af Aa/f/ |"A7" ge Ag |"^em" g>f ed |"A" cB AG |"G" Bg"D" Af |"^em" Ge"D" Fd | 
"^em" Eg"A7" f/e/d/c/ |"D" dA D2 :|  