Preparation of urea or its derivatives