Construct a musical work using the letter-based representation of the specified pattern and the given melodic subject.
X:1
L:1/8
M:2/4
K:D
['A2 B2 A2']  
X:1
L:1/8
M:2/4
K:D
 AABB | AG F2 | A2 B2 | A2 z2 | AABB | AGFD | AABB | AGFD | A2 B2 | A2 z2 |]  