added code for Uva: 1225 12577 12578