Reverses a sring input.