Amazon Interview Question

to write what is given in the passage