First off, welcome to LQ,
And then: the question smacks of home-work; if it is,
please re-read our rules
which you agreed to when you
signed up earlier, and don't post home-work questions
again ... If I'm getting the wrong idea please explain what
the actual task is you need to achieve.