Did you know that you can also reverse arrays and group them according to your liking with proper code?
Let's try it to believe it.
Instructions:
Input
The first line contains an odd positive integer. It is guaranteed that this integer is greater than or equal to 3.
The next lines contains an integer.
5 1 3 4 5 2
Output
A line containing grouped arrays.
{2,5}-{4}-{3,1}
Please fix the following input errors: