#include using namespace std; int main(void){ int t; cin>>t; for(int ii=0;ii>m; for(int i=1;i<10;i++){ int d; cin>>d; for(int j=0;j