Arduino Mega 2560 Serial Input Cycle Problem

Did you actually try it? What serial output do you get from each of them?