#include <iostream>
using namespace std;
void Invert(char arr[],int &i,char str[])
{
if(arr[i]==' ')
return;
else
{
str[i]=arr[i];
i++;
Invert(arr,i,str);
}
}
int main ()
{
char arr[]="abcdef";
int count=0,i;
char str[20];
Invert(arr,count,str);
for(i=count-1;i>=0;i--)
cout<<str[i];
cout<<endl;
return 0;
}