#include <bits/stdc++.h>

using namespace std;

long long C[111][111];

const long long MOD = 1e9 + 7;

void precalc() {
	for (int i = 0; i < 111; i++)
		C[i][0] = 1;
	for (int i = 1; i < 111; i++)
		for (int j = 1; j <= i; j++)
			C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % MOD; //, cerr << C[i][j] << " \n"[i == j];
}

bool check(string s) {
	for (size_t i = 1; i < s.length(); i++)
		if (s[i - 1] > s[i]) return false;
	return true;
}

int main() {
    ifstream in("numbers.in");
    ofstream out("numbers.out");
    
    string l, r;
    long long ans = 0;
    in >> l >> r;

    precalc();

    if (r.length() < 6) {
        for (int i = stoi(l); i <= stoi(r); i++) {
        	ans += check(to_string(i));
        }
        out << ans;
        return 0;
    }
    int n = r.length() - 1;
    out << (C[n + 9][n] + MOD - 1) % MOD;
    return 0;
}
