input h;
input r;
k:=r*h+h;
input m;
input n;
dim a(n),u(n,m);
input x0;
input a$;
label l1;
input x1;
if (x1-x0)<>h*(n-1) then print"error";goto l1;
input b$;
input t0;
input c$;
c1:=2+2/r;
c2:=2-2/r;
a(2):=c1;
n1:=n-1;
for i:=3 to n1;
a(i):=c1-1/a(i-1);
next i;
for i:=1 to n;
t:=t0;
x:=(i-1)*h+x0;
u(i-1):=val$(c$);
next i;
for j:=1 to m;
x:=x0;
t:=t0+(j-1)*k;
u(1,j):=val$(a$);
x:=x1;
u(n,j):=val(b$);
next j;
for j:=2 to m;
for i:=2 to n1;
u(i,j):=u(i-1,j-1)-c2*u(i,j-1)+u(i+1,j-1);
next i;
u(2,j):=u(2,j)+u(1,j);
for i:=3 to n1;
u(i,j):=u(i,j)+u(i-1,j)/a(i-1);
next i;
for i:=n1 to 2 step -1;
u(i,j):=(u(i,j)+u(i+1,j))/a(i);
next i;
next j;
for j:=1 to m;
print"T=";t0+(j-1)*k;
for i:=1 to n;
print" x=";x0+(i-1)*h;"u=";u(i,j);
next i;
print;
next j;
end;