#include <bits/stdc++.h>
using namespace std;
int main() {
  int kase;
  cin >> kase;
  while (kase--) {
    int n, m, p;
    cin >> n >> m;
    while (m--) {
      if (!m)
        cout << n << endl;
      else {
        cout << (p = pow(10, (int)log10(n - m))) << " ";
        n -= p;
      }
    }
  }
}
