import std.algorithm, std.array, std.container, std.range, std.bitmanip; import std.numeric, std.math, std.bigint, std.random, core.bitop; import std.string, std.regex, std.conv, std.stdio, std.typecons; void main() { auto n = readln.chomp.to!size_t; foreach (_; 0..n) { auto rd = readln.split.map!(to!long); auto a = rd[0], b = rd[1]; auto c = b * log10(a); auto z = c.floor.to!long; auto xy = 10 ^^ (c - z); auto x = xy.floor.to!long; auto y = ((xy - x) * 10).floor.to!long; writeln(x, " ", y, " ", z); } }