using System;using System.Collections.Generic;class M{Dictionaryd=new Dictionary();int p=9,x,y,u,v,z;char a='@',w='#',f='.',q='$',c,k;Random r=new Random();M(){x=y=p;d[S(x,y)]=a;k=K();while(k!='q'){Console.Clear();u=x;v=y;switch(k){case'4':case'h':x--;break;case'6':case'l':x++;break;case'8':case'k':y--;break;case'2':case'j':y++;break;}c=C(S(x,y));if(c==w){x=u;y=v;}if(c==q){Console.WriteLine("Win");K();return;}d[S(u,v)]=f;d[S(x,y)]=a;z=p*2-1;for(int j=0;j