hey i feel what uma had written will only solve the problem partially...what will happen in 2nd and 3rd case...correct me if i am wrong....