#include using namespace std; int n,m; char s[102][102]; int x[102][102]; int main() { int i,j,max=0; ifstream fin("stdin"); fin>>n>>m; for(i=0;i>s[i]; fin.close(); x[0][0]=1; for(i=0;ix[i][j+1]) x[i][j+1]=1+x[i][j]; if(i+1x[i+1][j]) x[i+1][j]=1+x[i][j]; if(x[i][j]>max) max=x[i][j]; } ofstream fout("stdout"); fout<