using System;
using System.Text;
public class Program
{
public static void Main(string str)
str= "Hello Nikhil";
int Start= str.Length-1;
int End = str.Length-1;
StringBuilder Rev= new StringBuilder();
int i;
while (Start > 0)
if (str[Start]==' ')
i= Start+1;
while(i<=End)
Rev.Append(str[i]);
i++;
}
Rev.Append(' ');
End= Start-1;
Start--;
for(i=0; i<=End; i++)
Console.WriteLine(Rev);