#ifndef POINTER04_H_
#define POINTER04_H_
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cassert>
void array_reverse (int *head, int *tail);
int main ()
{
int n;
scanf("%d", &n);
int *arr = (int *) malloc(sizeof(int[n]));
for (int i = 0; i < n; i++)
{
scanf("%d", &arr[i]);
}
array_reverse(arr, arr + n - 1);
for (int i = 0; i < n; i++)
{
printf("%d%c", arr[i], " \n"[i == n - 1]);
}
}
#endif // POINTER04_H_
I2lmbmRlZiBQT0lOVEVSMDRfSF8KI2RlZmluZSBQT0lOVEVSMDRfSF8KCiNpbmNsdWRlIDxjc3RkaW8+CiNpbmNsdWRlIDxjc3RkbGliPgojaW5jbHVkZSA8Y3N0cmluZz4KI2luY2x1ZGUgPGNhc3NlcnQ+Cgp2b2lkIGFycmF5X3JldmVyc2UgKGludCAqaGVhZCwgaW50ICp0YWlsKTsKCmludCBtYWluICgpCnsKICAgIGludCBuOwogICAgc2NhbmYoIiVkIiwgJm4pOwoKICAgIGludCAqYXJyID0gKGludCAqKSBtYWxsb2Moc2l6ZW9mKGludFtuXSkpOwogICAgZm9yIChpbnQgaSA9IDA7IGkgPCBuOyBpKyspCiAgICB7CiAgICAgICAgc2NhbmYoIiVkIiwgJmFycltpXSk7CiAgICB9CgogICAgYXJyYXlfcmV2ZXJzZShhcnIsIGFyciArIG4gLSAxKTsKCiAgICBmb3IgKGludCBpID0gMDsgaSA8IG47IGkrKykKICAgIHsKICAgICAgICBwcmludGYoIiVkJWMiLCBhcnJbaV0sICIgXG4iW2kgPT0gbiAtIDFdKTsKICAgIH0KfQojZW5kaWYgLy8gUE9JTlRFUjA0X0hfCg==