#include #include using namespace std; int main(){ int N,X,Y,Z; double A,B,L; cin >> N; for(int i=0;i> A >>B; L = B * log10(A); Z = floor(L); L = pow(10.0,L - Z); X = floor(L); Y = floor(10.0*(L-X)); cout << (int)X << " " << (int)Y << " " << (int)Z << endl; } return 0; }