#include <iostream>
using namespace std;
int main () { 
    
    int n;
    cout << "Enter the number of songs:";
    cin >> n;
    int playlist[n];
    cout << "Enter the song ID:";
    for (int i = 0; i< n; i++) {
        cin >> playlist[i];
    }
    
    cout << "Reserved playlist:";
    
    for (int i = n - 1; i >= 0; i--) {
        cout << playlist[i] << " ";
    }

    return 0;
}