apple pie's submission of Retrieve the Array | CodeChef