UVA540 TeamQueue.