added code for Uva:102