Code:
Output: