Solved problem #3 in variables