@AndrewStacey I've to say that unfortunately I didn't try seriously to solve the problem due to other thesis stuff problems. Hoping to have time soon, I'm happy to accept another hint.
@ClaudioFiandrino I think the next hint would give it away so let me know when you've tried. But don't try too hard - as I said, you'll kick yourself when you've figured it out. I was just keeping the room active.