Well, what do you think it does? You've already mentioned queues; could that be a hint? Are there any lines in the program that display anything? If so, what do they display, and could that be some help in determining what the program does?

The program appears to have some errors in it. Did you try compiling and running the code?