Solution 1
Solution 3