#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx2")
using namespace std;
struct matrix {
  int sz;
  long long a[105][105];
  matrix &operator=(const matrix &T) {
    sz = T.sz;
    for (int i = 1; i <= sz; i++) {
      for (int j = 1; j <= sz; j++) {
        a[i][j] = T.a[i][j];
      }
    }
    return *this;
  }
  matrix operator+(const matrix &T) const {
    matrix ans;
    ans.sz = sz;
    for (int i = 1; i <= sz; i++) {
      for (int j = 1; j <= sz; j++) {
        ans.a[i][j] = a[i][j] + T.a[i][j];
        ans.a[i][j] %= (int)(1e9 + 7);
      }
    }
    return ans;
  }
  matrix operator*(const matrix &T) const {
    matrix ans;
    ans.sz = sz;
    for (int i = 1; i <= sz; i++) {
      for (int j = 1; j <= sz; j++) {
        ans.a[i][j] = 0;
        for (int k = 1; k <= sz; k++) {
          ans.a[i][j] += a[i][k] * T.a[k][j];
          ans.a[i][j] %= (int)(1e9 + 7);
        }
      }
    }
    return ans;
  }
  matrix I() {
    matrix ans;
    ans.sz = sz;
    for (int i = 1; i <= sz; i++) {
      for (int j = 1; j <= sz; j++) {
        if (i == j)
          ans.a[i][j] = 1;
        else
          ans.a[i][j] = 0;
      }
    }
    return ans;
  }
  matrix power(long long p) {
    if (p == 0) return I();
    if (p == 1) return *this;
    matrix tmp = power(p / 2);
    if (p % 2)
      tmp = tmp * tmp * (*this);
    else
      tmp = tmp * tmp;
    return tmp;
  }
  void print() {
    for (int i = 1; i <= sz; i++) {
      for (int j = 1; j <= sz; j++) {
        printf(j == sz ? "%lld\n" : "%lld ", a[i][j]);
      }
    }
    return;
  }
};
struct polynomial {
  vector<complex<double> > v;
  int sz;
  polynomial operator*(const polynomial &T) const {
    polynomial ans;
    if (sz >= T.sz) {
      ans = *this;
      for (int i = 0; i < T.sz; i++) {
        ans.v[i] *= T.v[i];
      }
    } else {
      ans = T;
      for (int i = 0; i < sz; i++) {
        ans.v[i] *= v[i];
      }
    }
    return ans;
  }
};
polynomial FFT(polynomial a) {
  if (a.sz <= 1) return a;
  polynomial even, odd;
  even.sz = odd.sz = 0;
  for (int i = 0; i < a.sz; i += 2) {
    even.v.push_back(a.v[i]);
    even.sz++;
  }
  for (int i = 1; i < a.sz; i += 2) {
    odd.v.push_back(a.v[i]);
    odd.sz++;
  }
  polynomial Even = FFT(even);
  polynomial Odd = FFT(odd);
  polynomial ans;
  ans.sz = a.sz;
  for (int i = 0; i < ans.sz; i++) {
    ans.v.push_back(0);
  }
  for (int i = 0; i < a.sz / 2; i++) {
    complex<double> w =
        polar(1.0, -2 * (double)3.14159265358979 * i / a.sz) * Odd.v[i];
    ans.v[i] = Even.v[i] + w;
    ans.v[i + a.sz / 2] = Even.v[i] - w;
  }
  return ans;
}
polynomial IFFT(polynomial a) {
  for (int i = 0; i < a.sz; i++) {
    a.v[i] = conj(a.v[i]);
  }
  polynomial ans = FFT(a);
  for (int i = 0; i < a.sz; i++) {
    ans.v[i] = conj(ans.v[i]);
    ans.v[i] /= ans.sz;
  }
  return ans;
}
struct polygon {
  int n;
  pair<int, int> a[1005];
  double area() {
    double d1 = 0, d2 = 0;
    for (int i = 0; i < n; i++) {
      d1 += a[i].first * a[(i + 1) % n].second;
      d2 += a[(i + 1) % n].first * a[i].second;
    }
    return (d1 - d2) / 2;
  }
  bool inside(pair<long double, long double> p) {
    int ct = 0;
    long double d;
    pair<long double, long double> p1 = a[0];
    for (int i = 1; i <= n; i++) {
      pair<long double, long double> p2 = a[i % n];
      if (p.second > min(p1.second, p2.second) &&
          p.second <= max(p1.second, p2.second) &&
          p.first <= max(p1.first, p2.first) && p1.second != p2.second) {
        d = (p.second - p1.second) * (p2.first - p1.first) /
                (p2.second - p1.second) +
            p1.first;
        if (p1.first == p2.first || p.first <= d) ct++;
      }
      p1 = p2;
    }
    return ct % 2;
  }
};
struct graph {
  int n;
  vector<int> v[1005];
  int vis[1005], low[1005], t;
  int indeg[1005];
  stack<int> st;
  int top = 0;
  bool instack[1005];
  int to[1005];
  void tarjanDFS(int first) {
    vis[first] = low[first] = ++t;
    st.push(first);
    instack[first] = true;
    for (auto i : v[first]) {
      if (!vis[i]) tarjanDFS(i);
      if (instack[i]) {
        low[first] = min(low[first], low[i]);
      }
    }
    if (vis[first] == low[first]) {
      int i;
      do {
        i = st.top();
        st.pop();
        instack[i] = false;
        to[i] = first;
      } while (i != first);
    }
  }
  void tarjan() {
    memset(vis, 0, sizeof(vis));
    t = 0;
    for (int i = 1; i <= n; i++) {
      if (!vis[i]) tarjanDFS(i);
    }
    return;
  }
  void calIndeg() {
    for (int i = 1; i <= n; i++) {
      for (auto j : v[i]) indeg[j]++;
    }
    return;
  }
};
struct segtree {
  int l, r, mid;
  long long val = 0, lazy = 0;
  segtree *lc, *rc;
  segtree(int L, int R) {
    l = L;
    r = R;
    mid = (l + r) / 2;
    if (l != r) {
      lc = new segtree(l, mid);
      rc = new segtree(mid + 1, r);
    }
  }
  void apply(long long X) {
    val += X;
    lazy += X;
  }
  void push() {
    if (l == r) return;
    lc->apply(lazy);
    rc->apply(lazy);
    lazy = 0;
  }
  void update(int L, int R, long long X) {
    push();
    if (l == L && r == R) {
      apply(X);
      return;
    } else if (R <= mid)
      lc->update(L, R, X);
    else if (L >= mid + 1)
      rc->update(L, R, X);
    else {
      lc->update(L, mid, X);
      rc->update(mid + 1, R, X);
    }
    val = min(lc->val, rc->val);
  }
  long long query(int L, int R) {
    push();
    if (l == L && r == R)
      return val;
    else if (R <= mid)
      return lc->query(L, R);
    else if (L >= mid + 1)
      return rc->query(L, R);
    else {
      return min(lc->query(L, mid), rc->query(mid + 1, R));
    }
  }
} * segroot;
mt19937 rng(
    (unsigned int)chrono::steady_clock::now().time_since_epoch().count());
int rand(int l, int r) {
  uniform_int_distribution<int> uni(l, r);
  return uni(rng);
}
vector<long long> fac, inv;
long long power(long long a, long long p) {
  long long ans = 1;
  while (p) {
    if (p & 1) ans = ans * a % (int)(1e9 + 7);
    p >>= 1;
    a = a * a % (int)(1e9 + 7);
  }
  return ans;
}
vector<long long> inverse(int n) {
  vector<long long> ans(n + 1);
  ans[0] = ans[1] = 1;
  for (int i = 2; i <= n; i++) {
    ans[i] = ans[(int)(1e9 + 7) % i] * ((int)(1e9 + 7) - (int)(1e9 + 7) / i) %
             (int)(1e9 + 7);
  }
  return ans;
}
vector<long long> factorial(int n) {
  vector<long long> ans(n + 1);
  ans[0] = ans[1] = 1;
  for (int i = 2; i <= n; i++) {
    ans[i] = ans[i - 1] * i % (int)(1e9 + 7);
  }
  return ans;
}
vector<long long> factorialInverse(int n) {
  vector<long long> inv = inverse(n);
  vector<long long> ans(n + 1);
  ans[0] = ans[1] = 1;
  for (int i = 2; i <= n; i++) {
    ans[i] = inv[i] * ans[i - 1] % (int)(1e9 + 7);
  }
  return ans;
}
long long ncr(int n, int r) {
  return fac[n] * inv[r] % (int)(1e9 + 7) * inv[n - r] % (int)(1e9 + 7);
}
void calfacinv(int n) {
  fac = factorial(n);
  inv = factorialInverse(n);
  return;
}
struct node {
  int first, second;
  bool operator<(const node &T) const { return first < T.first; }
};
int T;
int n;
int a[105], sum;
void solve(int CASE) {
  scanf("%d%d", &(sum), &(n));
  int need = n;
  int tar = 1e9;
  int p = 0;
  int re = sum;
  memset(a, 0, sizeof(a));
  while (true) {
    p++;
    if (p > n) p = 1;
    if (need > 0) need--;
    while (re - tar < need) {
      tar /= 10;
    }
    a[p] += tar;
    re -= tar;
    if (re == 0) break;
  }
  for (int i = 1; i <= n; i++) {
    printf(i == n ? "%d\n" : "%d ", a[i]);
  }
  return;
}
int main() {
  T = 1;
  scanf("%d", &(T));
  for (int _ = 1; _ <= T; _++) {
    solve(_);
  }
  return 0;
}
