An elegant solution

An elegant solution