Amazon interview question

Can you write a code for xyz?