Unmasking Transformers: A Theoretical Approach to Data Recovery via Attention Weights