well for a start he can put the 3 pills aside,and continue normally ,taking pills,than at day 29 he will have an A pill and the 3 extras ,however before he must take the pills sepparatly to know each one results(function) on his system. so at day 29 takes a random pill,and when it has it's function it could be : 1) A pill ,then he pick another pill witch has to be a B
2) B pill ,then he takes the surely A pill that he has.
And leave the 2 others for day 30
i hope it has logic