Please, give me more details about this problem. What is the input, and what should be the output. Also, if you can give me an example, it should be better ;)... I have master and PhD in computer science, and more than 20 years working in c/c++. Best regards!