#include<iostream>
using namespace std;
main()
{
int n,a,b,large,small;
cout<<"Enter number of Integer in array"<<endl;
cin>>n;
int num[n];
cout<<"Enter element of array ";
for(int p=0;p<n;p++)
cin>>num[p];
for(int k=0;k<n-1;k++)
{
	a=num[k];
	b=num[k+1];
	if((num[k]-num[k+1]==1) || (num[k+1]-num[k]==1) || (num[k]==num[k+1]))
		{
	cout<<"No intermediate element present in between these "<<num[k]<<" & "<<num[k+1]<<" elements";
	  }
else
{
large=a>b?a:b;
small=a<b?a:b;
cout<<"Element between "<<num[k]<<" and "<<num[k+1]<<" is/are ";
for(int p=small;p<large-1;)
{
	cout<<++p<<" ";
}
}
cout<<endl;
}
}