#include <cstdio>
#include <iostream>
#include <vector>
#include <map>
#include <cstring>
#include <algorithm>
using namespace std;
int a, b, n;
vector<int> y;
int dp[12][12][12][2];
void splitNumber(int x){
while(x != 0){
y.push_back(x % 10);
x /= 10;
}
reverse(y.begin(), y.end());
}
int solve(int i, int qtd, int leftmost_lo, int leftmost_hi, int x, int numero){
int result = 0;
if(i == n){
if(leftmost_lo <= leftmost_hi){
return qtd;
}else{
return 0;//max(0, qtd - 1);
}
}
/*int &ret = dp[i][leftmost_lo][leftmost_hi][numero != 0];
if(ret != -1)
return ret;*/
for(int d = 0; d <= 9; d++){
int lm_lo = leftmost_lo;
int lm_hi = leftmost_hi;
if(d < y[i] && i < lm_lo){
lm_lo = i;
}
if(d > y[i] && i < lm_hi){
lm_hi = i;
}
int novo_numero = numero*10 + d;
if(d == 0 and !numero){
result += solve(i + 1, qtd, lm_lo, lm_hi, x, novo_numero);
}else
result += solve(i + 1, qtd + (x == d), lm_lo, lm_hi, x, novo_numero);
}
return result; //ret = result;
}
int main(){
while(scanf("%d %d", &a, &b) && (a || b)){
y.clear();
int ans[10] = {0};
splitNumber(a - 1);
n = (int) y.size();
for(int i = 0; i <= 9; i++){
memset(dp, -1, sizeof dp);
int ret = solve(0, 0, n, n, i, 0);
ans[i] = ret;
//printf("%d ", ans[i]);
}
//puts("");
y.clear();
splitNumber(b);
n = (int) y.size();
for(int i = 0; i <= 9; i++){
memset(dp, -1, sizeof dp);
int qtd = solve(0, 0, n, n, i, 0);
ans[i] = qtd - ans[i];
printf("%d ", ans[i]);
}
puts("");
}
return 0;
}
I2luY2x1ZGUgPGNzdGRpbz4KI2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8bWFwPgojaW5jbHVkZSA8Y3N0cmluZz4KI2luY2x1ZGUgPGFsZ29yaXRobT4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgYSwgYiwgbjsKdmVjdG9yPGludD4geTsKaW50I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