ugly Problem3.lhs