part a and b is done prints what it need to.