Added code for Uva: 10812