#include using namespace std; //typedef typedef unsigned int UINT; typedef unsigned long long ULL; typedef long long LL; typedef long double LD; typedef pair PLL; typedef tuple TLL3; typedef tuple TLL4; typedef set > setdownLL; #define PQ priority_queue typedef PQ, greater > pqupLL; //container utill #define ALL(v) (v).begin(),(v).end() #define CR [](auto element1, auto element2){return element1>element2;} #define LB lower_bound #define UP upper_bound #define PB push_back #define MP make_pair #define MT make_tuple //constant #define PI 3.141592653589793 const LL MOD=1000000007; int main(){ //input LL H,W; cin >> H >> W; string gri[H]; LL i,j,k; for(i=0; i> gri[i]; } bool vercan=1, horcan=1; char num; //check vertical for(j=0; j