AC solution to p1005