using System;
public class Program
{
static char[,]lab=
{",",",'*',",","}
{",",'*','*','*',",",'*'},
{",",",",",","},
{",'*','*','*',",","},
{",",",",",",'e'},
};
Staic void FindPath(int row,int col)
if((col<0) || (row<0)||
(col>=lab.GetLenght(1)) || (row>= lab.GetLength(0)))
retutn;
}
if(lab[row,col]=='e')
Console.WriteLine("Fpund the exit!");
if(lab[row,col]!=")
return;
lab[row,col]='s';
FindPath(row,col+1);
FindPath(row -1,col);
FindPath(row,col-1);
FindPath(row=1,col);
lab[row,col]=";
static void Main()
FindPath(0,0);