Solution to String-1