Exact solution in a string cosmological model