Added code for Uva:673