ProgramID- 9224
SkillRack
Predecessor and Successor of X

The program must accept N integers and an integer X as the input. The program must print the (X-1)th integer. Then the program must print the Xth integer. Finally, the program must print the (X+1)th integer.

Boundary Condition(s):
3 <= N <= 100
1 < X < N

Example Input/Output 1:
Input:
7
12 45 78 56 89 23 10
4

Output:
78 56 89

Example Input/Output 2:
Input :
9
25 48 95 14 65 20 87 36 60
5

Output :
14 65 20


Max Execution Time Limit: 1000 millisecs