Cisco Interview Question

Write a scripts for the elevator and algorithm on which call should get rpiority