mr_nobody's submissions for second problem