apple pie's submission of First and Last | CodeChef