using System;
public class Program
{
public static void Main()
String str = "AAA Z";
Console.WriteLine(str);
char[] charArray = str.ToCharArray();
for (int i = 0, j = str.Length - 1; i < j; i++, j--)
charArray[i] = str[j];
charArray[j] = str[i];
}
string strReversed = new string(charArray);
Console.WriteLine(strReversed);