Given array of n integers. Swap the neighbouring elements of array (a[0]
with a[1]
,a[2]
with a[3]
and so on). If there are odd number of elements, leave the last element of its place.
First line contains number n. Next line contains n integers. All numbers do not exceed 100 by absolute value.
Print the updated array.