uva 1508 solution