solve reverse string