Basic string exercises by google, part 2. Solved.