A*B Problem