#include <stdio.h>
#include <stdlib.h>
#define MAX 100
typedef struct
{
char data[MAX];
int len;
}SqList;
void initSqList(SqList* pL)
{
int i, n, m;
scanf("%d", &n);
getchar();
pL->len = n;
for (i = 0; i < n; i++)
{
scanf("%c", &m);
pL->data[i] = m;
}
}
void reverseSqList(SqList* pL1, SqList* pL2)
{
int i = 0, j;
pL2->len = pL1->len;
j = pL1->len - 1;
for (i = 0, j = pL1->len - 1; i <= j, j >= 0; i++, j--)
{
pL2->data[i] = pL1->data[j];
}
}
void dispSqList(SqList* pL)
{
int i;
for (i = 0; i < pL->len; i++)
printf("%c ", pL->data[i]);
}
int main()
{
SqList* pLA, * pLB;
pLA = (SqList*)malloc(sizeof(SqList));
initSqList(pLA);
pLB = (SqList*)malloc(sizeof(SqList));
reverseSqList(pLA, pLB);
dispSqList(pLB);
return 0;
}