2. [5 points] Consider the following function F written in a C-like pseudo-code, which takes an array A of n positive integers and an initially-empty stack S as input parameters:

What is the output (returned value) of the function F for the array A= [2, 14, 4, 7, 11, 18, 10, 15, 6, 23, 12, 8]?