#include <bits/stdc++.h>
using namespace std;
void Clearing_out() { return; }
template <typename Head, typename... Tail>
void Clearing_out(Head &H, Tail &...T) {
  H.clear();
  Clearing_out(T...);
}
long long int n;
void testcase() {
  long long int k;
  cin >> n >> k;
  while (k--) {
    long long int p;
    if (!k)
      cout << n << " ";
    else {
      long long int p = pow(10, (long long int)log10(n - k));
      cout << p << " ";
      n -= p;
    }
  }
  cout << "\n";
  return;
}
int32_t main() {
  long long int test = 1;
  cin >> test;
  long long int t = 0;
  while (test--) {
    testcase();
  }
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
  return 0;
}
