Hint 1
If you enter a room that has two doors, there is only one possible exit - the door you did not enter from - and you will not be able to pass through that room again.
If a room has more than two doors, you have to pass through it again after exiting.
Also, don't forget that you don't need to exit the room you end up in last. Which means...?

