Added code for Uva:623