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