What is the difference meaning of the two sentences?

  1. Mindy hung the picture over the book shelves that she painted last week.

  2. Mindy hung the picture that she painted last week over the book shelves.


The first one is ambiguous, but probably means that she painted the bookshelf. The second one is not ambiguous and it was the picture that she painted.