Program to reverse a given string