Thank you so much! I've met replicateM_ for the first time;-) This could be a "template" for doing online-judge exercises I guess. And it's very useful for newbies like me. Again many Thanks:-)