Huge interview question

Create a function that captures X data.