Ответ:

When I opened the door, the cat was sitting on the table.