#include <iostream>

using namespace std;

void reverse(int* l,int size)
{
    for(int i=0; i<size/2; i++)
    {
        int temp = l[i];
        l[i] = l[size-1-i];
        l[size-1-i] = temp;
    }
}

int main()
{
    cout << "n:";
    int n;
    cin >> n;
    cout << "a:";
    int* pA = new int[n];
    for(int i=0; i<n; i++)
    {
        cin >> pA[i];
    }
    int b[20000];
    int size = 0;
    for(int i=0; i<n; i++)
    {
        b[i] = pA[i];
        ++size;
        reverse(b,size);
    }
    cout << "b: ";
    for(int i=0; i<n; i++)
    {
        cout << b[i] << " ";
    }
    delete [] pA;
    return 0;
}