Solutions for some tasks.