The sensor at each station detects the arrival or {TAIL ~ departure} of {HEAD ~ each customer} 
The sensor at each station detects the arrival or { TAIL ~ departure } of { HEAD ~ each customer }
OTH OTH OTH OTH OTH OTH OTH OTH OTH TAIL TAIL TAIL TAIL TAIL OTH HEAD HEAD HEAD HEAD HEAD HEAD