Solution part 1.