Code not running as expected!

The RFID tag contains 12 bytes of data and this is why i have to read from serial 12 times. It is used for comparing with a pre-provided RFID tag number. If the two serial numbers match, the output is shown.