#include #include #include #include #include #include #include #include #include #include #include using namespace std; const long long modc = 1e9+9; int main(){ long long T, M, q; cin >> T; vector dp(90001), S(90001); dp[0] = 1; for (int j=1; j<=9; j++){ for (int i=0; i<=90000; i++){ if (i-j >= 0) dp[i] = (dp[i] + dp[i-j]) % modc; } } S[0] = 1; for (int i=1; i<=90000; i++){ S[i] = (S[i-1] + dp[i]) % modc; } for (int i=0; i> M; q = M / 111111; cout << S[q] << endl; } return 0; }