#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int s, n;
    cin >> s >> n;
    int temp = s, p = 1;
    while (temp > 0) {
      temp /= 10;
      p *= 10;
    }
    p /= 10;
    while (n > 1) {
      if (s - p >= n - 1) {
        cout << p << " ";
        s -= p;
        n--;
      } else
        p /= 10;
    }
    cout << s << endl;
  }
}
