#include using namespace std; using ll = long long; const int basis = 111111; const ll MOD = 1e9 + 9; int main() { ll dp[100020] = {}; dp[0] = 1; for (int i = 0; i < 10; i++) { int t = i; if (t == 0) t = 1; for (int c = 0; c < 100000; c++) { (dp[c + t] += dp[c]) %= MOD; } } int T; cin >> T; while (T--) { ll M; cin >> M; cout << dp[M / basis] << endl; } }