for(string s:stdin){for(int i;i<9;++i)ask(substr("0987654321",(int)substr(s,i,1),1));write();};