#include using namespace std; using Int=long long; using Real=long double; templateinline bool chmin(T&A,S B){return(A>B?A=B,1:0);} templateinline bool chmax(T&A,S B){return(A>N; REP(i,99) { int nN=0; while(N)nN+=N%10,N/=10; N=nN; } cout<>T; while(T--)sol(); }