Andy: brute force AC code for UVa#11362.