The code which produces the above is: