class Visitors extends Thread {
    Museum museum;
    int groupSize;
    
    Visitors(Museum m, int w) {
        museum = m;
        groupSize = w;
    }
    
    /*
        The group walks around on its own for 50 time units
        You may need to alter this figure to suit your computer
        They then replace all their Walkmen and leave.
        The thread dies with them.
    */
    public void run() {
        try{
            sleep((int)(Math.random()*1000)+1);
        }catch(InterruptedException e) {}
        museum.replace(groupSize);
    }
}