Discrete-time Tandem Queues With Arrivals And Departures At Each Stage