another fun logic problem. Slightly tricky