solution for uva 12097