#include using namespace std; char s1[60][60],s2[60][60]; int ans[60],flag; int n,m; int vs[60]; bool check(int x,int y) { for (int i=0;i>t; while (t--) { scanf("%d %d",&n,&m); for (int i=0;i