#include <iostream>
using namespace std;

void tnirp(const char* str)
{
	if(*str)
	{
		tnirp(str+1);
		cout << *str;
	}
}


void print(const char* str)
{
	if(*str)
	{
		cout << *str;
		print(str+1);
	}
}

int main() 
{
	const char str[]="Roses are red";
	print(str);
	cout << endl;
	tnirp(str);
	
	return 0;
}