Code now outputs the final plate as per the requirements