A.M. Best Interview Question

Output of a program