#include <iostream>
using namespace std;

int main() {

    int arr[6] = { 0 };

    int len = sizeof(arr) / sizeof(int);
    
    for (int i = 0; i < len; i++) {
        cin >> arr[i];
    }
    cout<<"[";
    for (int i=0;i<len;i++)
    {
        cout<<arr[i];
        if(i!=len-1){
            cout<<", ";
        }
    }
    cout<<"]"<<endl;

    cout<<"[";
    for (int i=len-1;i>=0;i--)
    {
        cout<<arr[i];
        if(i!=0){
            cout<<", ";
        }
    }
    cout<<"]";



   

    return 0;
}