Solution for fun2'