A=zeros(3);
B=zeros(3);
[N]=textread('input.txt',"%f");
for i=1:3
	for j=1:3
		A(i,j)=N(3*(i-1)+j);
	endfor
endfor
[N]=textread('action.txt',"%f");
for i=1:3
	for j=1:3
		B(i,j)=N(3*(i-1)+j);
	endfor
endfor
final = @final_state_3(A,B)