import java.util.*; public class Main { static int[][] map; static boolean[][] check; static int[] vr={1,0,-1,0}; static int[] vc={0,1,0,-1}; static int column; static int row; static boolean dfs(int nowr,int nowc,int fromr,int fromc,boolean[][] tesuto,int num){ check[nowr][nowc]=true; tesuto[nowr][nowc]=true; for(int i=0;i<4;i++){ int nr=nowr+vr[i]; int nc=nowc+vc[i]; if(0<=nr&&nr