#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 - floor(ans)); s = floor(s * 10); cout << int(s) / 10 << " " << int(s) % 10 << " " << floor(ans) << '\n'; } }