#include using namespace std; using ll=long long; using ld=long double; using P=pair; using V=vector; #define rep(i,n) for(int i=0;i> h >> w; vector a(h,V(w)); rep(i,h) rep(j,w){ char c; cin >> c; a[i][j]=c-'a'; } string t; t+=(char)('a'+a[0][0]); vector> s(h+w-1); s[0].insert(P(0,0)); rep(l,h+w-2){ int c=100; for(auto i=s[l].begin();i!=s[l].end();++i){ P p=*i; int x=p.first,y=p.second; if(x+1