I want to print the values of the elements beside any given element. For example : 1 2 3 4 5 If I want the elements that are beside 2, I want to out put 1 and 3