I did the second option. When I choose the bottom of the third rectangular block to be fixed, it did not want to assign it. The image shows what happen when I want to assign the bottom to be fixed.  

I tried also the first option, but in that case the acceleration will be in all the bodies and I do not want that case.