Solution

replace peerGroup=students+students[_n+1] if grade==1
replace peerGroup=students[_n-1]+students if grade==12

Last Revised: 12/17/2015