Draw your stack to find the output of the following program:

public class RecApp
{
	public static void main(String [] args)
	{
		int num = 5;
		func(num);
	}
	public static void func(int n)
	{
		if(n > 0)
		{
		   n--;
		   func(n);
		   System.out.print("A");
		   func(n-2);
		   System.out.print("B");

		}
	}
}

Output: