Code:

Input: