A rare visitor from beyond the Solar System has given scientists a fleeting chance to peer into the chemistry of deep space.