#include using namespace std; using ll = long long; #define vector4d(type,name,h,w,d,...) vector>>>name(h,vector>>(w,vector>(d,vector(__VA_ARGS__)))) int main(){ ios::sync_with_stdio(false); cin.tie(0); int T, A, B; cin >> T; while(T--){ cin >> A >> B; double ans = B * log10(A); double s = pow(10, ans - int(ans)); cout << int(s * 10) / 10 << " " << int(s * 10) % 10 << " " << int(ans) << '\n'; } }