figure six person game of hot potatothis game is modern-day equivalent of the famous josephus problem based on legend about the famous first-century historian flavius josephusthe story is told that in the jewish revolt against romejosephus and of his comrades held out against the romans in cave with defeat imminentthey decided that they would rather die than be slaves to the romans they arranged themselves in circle one man was designated as number oneand proceeding clockwise they killed every seventh man josephusaccording to the legendwas among other things an accomplished mathematician he instantly figured out where he ought to sit in order to be the last to go when the time cameinstead of killing himselfhe joined the roman side you can find many different versions of this story some count every third man and some allow the last man to escape on horse in any casethe idea is the same we will implement general simulation of hot potato our program will input list of names and constantcall it "numto be used for counting it will return the name of the last person remaining after repetitive counting by num what happens at that point is up to you to simulate the circlewe will use queue (see figure assume that the child holding the potato will be at the front of the queue upon passing the potatothe simulation will simply dequeue and then immediately enqueue that childputting her at the end of the line she will then wait until all the others have been at the front before it will be her turn again after num dequeue/enqueue operationsthe child at the front will be removed permanently and another cycle will begin this process will continue until only one name remains (the size of the queue is call to the hot_potato function using as the counting constant returns susan import queue as previously defined def hot_potato(name_listnum)sim_queue queue(for name in name_listsim_queue enqueue(name queues