function [action] = lookup_solve_3(initial) 
	action = zeros(3);
	action(2,:)=initial(1,:);  #clearing the first row
	final = final_state_3(initial,action);  #finding the resulting matrix
	action(3,:)=final(2,:);   #clearing the second row
	final = final_state_3(initial,action);  #finding the resulting matrix
	check = zeros(3);
	if final==check
	else
		action(1,:) = self_change(final(3,:));  #changing first row according to the last row
		final = final_state_3(initial,action);
		action = action+lookup_solve_3(final);  #repitition by recurrsion
		action = mod(action,2);
	endif
endfunction