How can I set the item type base on the input time and output time?
Box input sequence is box1, box2, box3...
When the larger numbers are output earlier than smaller numbers then set smaller number as type 2 and others are type 1(i.e. if box7 output time is earlier than box6, then set box6 as type 2 and box7 as type 1)