This is my uva solving code