// PARK CHAEYOUNG IS MY LOVE
// Author: Ngo Ba Van
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fi first
#define se second
using ii=pair<int,int>;
const ll N=4e3+5,M=1e9+7;
ll n,m,res,dis[N][N],sz[N][N];
ll dx[4]={-1,0,1,0},dy[4]={0,1,0,-1};
char a[N][N];
bool check(int x,int y)
{
return (x>0&&y>0&&x<=n&&y<=m&&a[x][y]!='.');
}
void BFS()
{
deque<ii>de;
//memset(dis,0x3f,sizeof dis);
dis[1][1]=1;
de.push_back({1,1});
while (!de.empty())
{
int u=de.front().fi;
int v=de.front().se;
res=max(res,dis[u][v]);
de.pop_front();
for (int i=0;i<=3;i++)
{
int uv=u+dx[i];
int vv=v+dy[i];
if (check(uv,vv)==true&&dis[uv][vv]==0)
{
if (a[uv][vv]==a[u][v])
{
dis[uv][vv]=dis[u][v];
de.push_front({uv,vv});
}
else
{
dis[uv][vv]=dis[u][v]+1;
de.push_back({uv,vv});
}
}
}
}
}
void nhap()
{
cin>>n>>m;
for (int i=1;i<=n;i++)
{
string s;
cin>>s;
for (int j=1;j<=m;j++)
a[i][j]=s[j-1];
}
BFS();
cout<<res;
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
#define task ""
#define task "a"
if(fopen(task".inp","r"))
{
freopen(task".inp","r",stdin);
freopen(task".out","w",stdout);
}
int t=1;
//cin>>t;
while (t--)
nhap();
}
/*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$kdtjjijjttdkk$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ktijjjjtttttttdk$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$d
$$$$$$$$$$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ddttkjtdttijkkkdtjjjjtdddddttjtt$$##ww$kddk$$$$$$$$$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$kttkdtttkjtddtijtdddtjjjtdkkkkddddttk##www$kkdk$$$$$$$$$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$kttkddtddjdkwkid#kddtjjjtdddttttttttdw#w@w$kkdk$$$$$$$$$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$kttkdttktjdk$djd@wktjjjjtdddkkdtttttdwww@w$dkkdk$$$$$$$$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$kttktttktjtddtjd$$dtjiijtd$d#@@wkdjjtwwww#$ddkdk$$$$$$$$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$kttktttktttjjjjddtjjiiijjddtk#$#$djjt##ww#$ddddk$$$$$$$$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$dttktddkjjjjjijjjjiii.iiijtddddtjjjjt$$##$$ddddd$$$$$$$$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$dttddtdkjjjjiijiiiiii.iiiijjttjiiijjd$k$kkktttdd$$$$$$$$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$dttdddkkjjjjijjiiiiii.iiiiiiiiiiiijjdkk#$kkjttdt$$$$$$$$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$dttkddk$tttjijiiiiiii.iiiiiiiiiiijjtkk$#kk$jjtdtk$$$$$$$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$dttkdtk$tttjijjiijiii.ijjiiiiiiijjjtkk##dkkjjtttk$$$$$$$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$dttkddk$tttjjjjjjjiiiiiijjiiiiiijjtd$kw$tddjjtttd$$$$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$kddddkdkk$$#kttjjtjjjjdtjjjttddkdk$$k$ktttttijjjjdk$$$$$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$kddddkdkk$#$kdtjjjiijttjjjtttddkdk$$$k$dttttjjjjjtk$$$$$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$kddddkkkk$#$kdttjjiijjjjjtdkdtdkd$$$ddkdtjjttjjjjjk$$$$$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$kdddddkk$$##ddtttjijjttttdkddttddkkk$kddtjjjjjjjjjdk$$$$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$kkddddkk$$#wktttdiijjddkk$kdttdkddddddttdjjiijjjjjtkk$$$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$kkdddddk$#wwktttjiiiik$$$kdtttdk$ddttd$djiiiiiijjjjdkkk$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$kkdddddk$#w@ktjtiiiiitkkkdtttttkkkddd#tjiiiiiiiiijjtkkk$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$kkddddk$#@@kjjjiiiii.....ijtttddktj$tiiii...iiiiijjdkk$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$kkddddk$w@@kjjiiiiiiiiii..ijjttjiitkiiiii.....iiiijtk$$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$kkkdkdk#w@@djjiiiiiiiiijjiijjjiiij#jiiiiii....iiiijjdk$$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$kkkdkdk#
[email protected]$jjiiiiiiiiiiiiijjjdk$$$$$$$$$$$$d
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$kdddk#@@kjjiiiiiiiiiiiiijjjttjjwdjjiiiiiiiiiiiiijjjjk$$$$$$$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iiijjiiiiiiiiiiiiiiiijjtdtjtkk$$$$$$d
$kkkkkkkkkkktiiiiiiiiii#wjiiiiiiii..iijjjttkkdtjjjiiiidwwtiiiiiijjiiiiiiiiiiiiiiiijjdtjtkkk$$$$$d
####
[email protected]$#$iiiiiijjiiiiiiiiiiiiiiiijjddjjkkk$$$$$d
@@@@@@w#$$kkjiiiiiiiii#wiiiiiiiii.iiiiiijdddtjjiidki t$iiiiijjiiiiiiiiiiiiiiiijjddtjdkk$$$$$d
@@@@@@@@w#$diiiiiiiiiiw$iii..iii..iiiiijtddtjjij#j j$iiiijjiiiiiiiiiiiiiiiijjddtjtkk$$$$$d
@@@@@@@@@@@diiiiiiiiit$diiiiiii..iiiiiitddtjjidk. .diiiitiiiiiiiiiiiiiiiijjtdttjkk$$$$$d
ww@@@@@@@@@jiiiiiiiiittd#kiiiii..iiiiittttjii$j.. .jiijtiiiiiiiiiiiiiiiiijtdttjdk$$$$$d
#ww@@@@@@@wiiiiiiiiii .t$iii..iiiiijtttjijki. .. jjjtiiiiiiiiiiiiiiiiijtddtjtk$$$$$d
$#ww@@@@@@$iiiiiiiiii .iii..iiiiiitttjitj. .. ttdiiiiiiiiiiiiiiiijjtddttjkk$$$$d
#wwww@@@@@kiiiiiiiii. iiii..iiiiijtttjti. .. .d$jiiiiiiiiiiiiiiijjtddttjdkk$$$d
#wwwww@@@@diiiiiiiii .iii...iiiiiitttdj... .....jtiiiiiiiiiiiiiiijjtddttjdk$$$$d
#wwwww@@@@tiiiiiiii. .iiii...iiiiijttdi... ....jiiiiiiiiiiiiiiijjdddttttkk$$$d
##wwww@@@@tiiiiiiii. iiiiiiiiiiiiitdj..... ..iijiiiiiiiiiiiiiiijjddktttjkk$$$d
$#wwww@@@@jiiiiiiii. iiiiiiiiiiiiikwi...... ..ijjiiiiiiiiiiiiiijjjddktjdtdk$$$d
$#wwww@@@@jiiiiiiii .iiiiiiiiiiiit@k....... ...ijiiiiiiiiiiiiiijjtkdktjdttkk$$d
$#wwww@@@@jiiiiiii..iiiiiiiiiiiii#w..... .... ... ...ijiiiiiiiiiiiiiijjtkdkdjddtkk$$d
##wwww@@@wjiiiiiiiiiiiiiiiiiiiiittk.......... . ....ijiiiiiiiiiiiiijjjdkdkdttdtdkk$t
wwwwww@@@$iiiii.iiiiiiiiiiiiiiiijii.. ..... ......... ....ijiiiiiiiiiiiiijjtdkdkdtjddtkkkt
wwwww@@@@diiiiiiiiiiiiiiiiiiiiiji.......... ... .......... .....iiiiiiiiiiiiiijjjtdkkkdtjdktkkkt
#wwww@@@wjiiiiiiiiiiiiiiiiiiiijji.................................iiiiiiiiiiiiijjttdkkkktjdkdtkkt
#wwwwwww$iiiiiiiiiiiiiiiiiiiiijii..................................iiiiiiiiiiiijjtttkkdktjdkktkkt
########diiiiiiiiiiiiiiiiiiiijji......... .........................iiiiiiiiiiiijjtttkkdktjdkkddkt
#######$jiiiiiiiiiiiiiiiiiiiijji..............................iii..jiiiiiiiiiijjjttdkkkkdjtkkdtkt
####$$$kjiiiiiiiiiiiiiiiiiiijjii...........ii...................iijiiiiiiiiiiijjjttdkkkkdjtkkddtt
###$$$$djiiiiiiiiiiiiiiiiiijjj.................i.........i........jiiiiiiiiiiijjtttddkkkdjtkkkdtj
####$$$diiijiiiiiiiiiiiiiijjji.................d.....iiiiii.......jiiiiiiiiiiijjjttddkkkdjtkkkktj
ww##$$#tiijiiiiiiiiiiiiiijjjjiiiiiiiiijiiii....ti.iiiiiiii........iiiiiiiiiiiijjtttdkkkkkjtkkkkdj
ww#$$$#jjjiiiiiiiiiiiijjjjjttjjjiiii.......iii.tjiiiiii...........ijiiiiiiiiijjjtjjdkkkkkttk$$kkj
ww#####jjjiiiiiiiiiiijjjjjjdj...........iijjii.ttiiiiiiii.........iiiiiiiiiiijjjtjjdkkkkktjk$$$dt
wwwww@$jjiiiiiiiiiiijjjjjjtii.....iiiijjjjiiii.jtii..iiiiiii......iiiiiiiiiiijjjtjjdkkkkktjk$$$kt
wwww@@djjiiiiiiiiijjjjjjjtdtjjjjjjjjjjjiiii....jtii....i..........ijiiiiiiiiijjjtjjdkkkkktjk$$$kt
wwwwwwtjjiiiiiiiijjjjjjjjddjjjjjjjiiiiii....ii.jdiiii............ijjiiiiiiiiijjjtjjdkkkkkdjd$$$kt
wwwwwwjjjiiiiiiiijjjjjjjdddtjjiiiii........ii..it....ii...........jjiiiiiiiiijjtjjjtkkkkkkjtk$$$t
wwwwwwjjiiiiiiiijjjjjjjtkddjjiii...............jj.................ijiiiiiiiiijjtjjjtkkkkkkttk$$$t
ww#ww#jjiiiiiiijjjjjjjjkkdtjiii............... t. ...........ijiiiiiiiiijjtjjttkkkkkktjk$$$t
ww##w#jiiiijjjjjjjjjttdkdtjii.............. t ..... ........ijiiiiiiiijjjtjjtjk$kkkkdjk$$$t
w###w$jiijjjjjjjjjjttt$ddtji.............. d ............ijiiiiiiiiijjtjjtt$$kkkkdtd$$$t
####wkjijjjjjjjjjtttt$$ddjii......... .t ...........ijiiiiiiiiijjttjjtk$$k$kdttk$$t
####wtjjjjjjjjjjttttkkkdjii............ jj ........ ...ijiiiiiiiiijjttjjtk$$$$kkttk$$j
####wjjjjjjjjjjtttdkkkktji................iijjttii. ..... ...ijjjiiiiiiijjttjjtk$kkkkkdtkkkj
####wtttjjjjjjtttdkkkkkjii.........ijjjjji.......ijjiii.. ....ijjjiiiiiiijjtttjtkkkkkkkdtdkkt
#####ktttjjjjttddkkkk$tii..iiijjjjiiiiii.i........ii...iijjjji....ijjjiiiiiiijttttjjkkkkkkkkttkkt
######dtttjjjtddkkkkk$jiittjiiiiiiiiiiiiiiii.......i..iiiiiiitti..itjjjiiiiiijtttjjjkkkkkkkkdtddt
######$dttttttddkkkkkkjddjjiiiiiiiiiiiiiiiiiiiii......iiiiiiiiijj.itjjjiiiiiijttdjjjkkkkkkkkdtddt
$$###ww#kdddddkkkkkkkkkttjjiiiiiiiiiiiiiiiiiiiiii..iiiiiiiiiiiijjtitjjjiiiiiiitddjjjddkkkkkkkttkd
$$###w##$$$$$$$$$kkkkddttjjiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiijjjdtjjjiiiiiiitddjjjkkkddkkkkdtkt
$########$$#$$$$$$kkkkdttjjiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiijjt$dtjjiiiiiiitddjjjdkkkkdddkdtdt
#########$$$$$$$$$$kkkdtjjjiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiijjt$kttjiiiiiiijddttjttdkkkkkddttt
#########$$$$$$$$$$$kkttjjiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiijjjd#kttjiiiiiiijtdttjdtddkkkkkkddj
########$$$$$$$$$$$$$ktjjjiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiijjijjtd#kttjiiiiiiijtdttttddtddkkkkddj
########$$$$$$$$$$$$$$tjjjiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiijjjjjjtk#kttjjiiiiiijtdttdkddkdtdkkkkdt
########$$$$$$$$$$$$$ktjjjjiiiiiiiiiiiiiiiiiiiiiiiiiiiiiijjjjjjjtk#dttjjiiiiijjtdtdkkkkddkkdddkkt
#######$$$$$$$$$$$$$$kjjjjjiiiiiiiiiiiiiiiiiiiiiiiiiiiiijjjjjjjttk$ddttjiiiiijjtddkkkkk$kdkkkdddt
########$$$$$$$$$$$$$kjjjjjiiiiiiiiiiiiiiiiiiiiiiiiiiijjjjjjjjjtd$kddttjiiiiijjttdkkkkkkkkkkkkkkt
###########$$$$$$$$$$ktjjjjjiiiiiiiiiiiiiiiiiiiiiiijjjjjjjjjjjjtd$kddttjjiiiiijjtdkkkkkkkkkkkkkkt
###########$$$$$$$$$$$ttjjjjijjttttdddddkkkkkkkkkkddttjijtjjjjjtd$dkdttjjiiiiijjtddkkkkkkkkkkkkkt
#w#########$$$$$#####w$$#ww@@wwwwwwwwwwwwwwwwwwwwww@@@@@@@w$djtdk$dkddtjjiiiiijjtddkkkkkkkkkkkkkt
############$$##$$$$$#wwwwwwwwwwwwwwwwwwwwwwwwwwwww@@@@@@@$kw#dk$kdkddtjjiiiiijjtdddkkkkkkkkkkkkt
###############$kkkk$$#wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww#d#d@@w#ddkddtjjjiiiijjtdkdkkkkkkkkkkkkt
##############$kkkkk$$#wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww#d$d@@@kkdkkdtjjjiiiijjjdkddkkkkkkkkkkkt
##########$##$kkkkkk$$#wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww$d$@@$kkdkkdtjjjiiiijjjtdkkdkkkkkkkkkkt
#############kkkkkkk$$#wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwkkkdkkdtjjjjiiijjjtdkkkkkkkkkkkkkt
###########w$kkkkkkk$$#wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww#kkdkkdtjjjjiiiijjtdkkkkkkkkkkkkkt
##########w#kkkkkkkk$$#w##wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww$kdkkddjjjjiiiijjjdkkkkkkkkkkkkkt
#########ww$kkkkkkkk$w####wwwwwwwwwwwwwwww####wwwwwwwwwwwwwwwwww#kkkkddjjjjiiiijjjkkkkkkkkkkkkkkt
#########w#$kkkkkkk$www####wwwwwwwwwwww###########wwwwwwwwwwwwwwwkkkkddtjjjiiiijiiddtdktdkddddttj
########ww$kkkkkkkkwwwwww#w#w######wwwww######w#####wwwwwwwww#www#kkkddtjjjjiiijiitdddkttkddddjdt
########ww$kkkkkkk#wwwwwwwwww######wwwww######w#####wwwwwwwwwwwww@kkkddtjjjjjiijjjtkkkkkkkkkkkkkt
#######www$$kkkkk#wwwwwwww#####w#########w####w#####wwwwwwwwwwwww@$kkddtjjjjjiijjjtkkkkkkkkkkkkkt
#######w@w$$kkkkkwwwwwww#w#####w###########w#w#####wwwwwwwwwwwwwww#kkddtjjjjjiijjjtkkkkkkkkkkkkkt
######ww@w#$kkkk#wwwwwwwww#####w########wwwwwwwwwwwwwwwwwwwwwwwwwwwkkdddjjjjjiijjjjkkkkkkkkkkkkkt
######ww@w#$kkk$wwwwwwwwwww###w####w#wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwdkdddjjjjjjijjjjkkkkkkkkkkkkkt
####wwww@w#$$kk#wwwwwwwwwww###w#######wwwwwwwwwwwwwwwwwwwwwwwwwwwww$kkddtjjjjjjjjjjkkkkkkkkkkkkkt
###wwwww@w#$$k$wwwwwwwwwwww##ww######wwwwwwwwwwwwwwwwwwwwwwwwwwwwww#dkkdtjjjjjjjjjjdkkkkkkkkkkkkt
@@@@@@@@@@wwwww@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#####$$$$$$$$$$#wwwwwwwwwwww$ddd?*/
Compilation message (stderr)
tracks.cpp:66: warning: "task" redefined
66 | #define task "a"
|
tracks.cpp:65: note: this is the location of the previous definition
65 | #define task ""
|
tracks.cpp: In function 'int main()':
tracks.cpp:69:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
69 | freopen(task".inp","r",stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
tracks.cpp:70:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
70 | freopen(task".out","w",stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~