582 Solution