Second homework. First to third tasks