#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define debug_value(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << #x << "=" << x << endl; #define debug(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << x << endl; template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } using namespace std; typedef long long ll; template vector> vec2d(int n, int m, T v){ return vector>(n, vector(m, v)); } template vector>> vec3d(int n, int m, int k, T v){ return vector>>(n, vector>(m, vector(k, v))); } template void print_vector(vector v, char delimiter=' '){ if(v.empty()) { cout << endl; return; } for(int i = 0; i+1 < v.size(); i++) cout << v[i] << delimiter; cout << v.back() << endl; } using mint = atcoder::modint998244353; const int MOD = 998244353; mint pow(mint a, ll n) { assert(n >= 0); mint ans = 1; while (n > 0) { if (n&1) ans = ans*a; a = a*a; n >>= 1; } return ans; } ostream& operator<<(ostream& os, const mint& m){ os << m.val(); return os; } vector calc(vector> v){ if(v.size() == 1){ return v[0]; } int n = v.size(); vector> vl, vr; for(int i = 0; i < n; i++){ if(i*2 < n) vl.push_back(v[i]); else vr.push_back(v[i]); } return atcoder::convolution(calc(vl), calc(vr)); } ll mod_pow(ll a, ll n, ll mod) { ll ans = 1; while (n > 0) { if (n&1) ans = (ans*a)%mod; a = (a*a)% mod; n >>= 1; } return ans; } int main(){ ios::sync_with_stdio(false); cin.tie(0); cout << setprecision(10) << fixed; int n; cin >> n; vector a(n); for(int i = 0; i < n; i++) cin >> a[i]; vector> v; for(int i = 0; i < n-1; i++){ int p2 = mod_pow(2, i, MOD-1); mint p10 = pow(mint(10), p2); v.push_back({p10, mint(1)}); } auto u = calc(v); vector uu(n); for(int i = 0; i < n; i++){ int j = (n-i)%n; uu[j] = u[i]; } vector b(n); for(int i = 0; i < n; i++) b[i] = a[i]; auto w = atcoder::convolution(b, uu); vector ans(n); for(int i = 0; i < 2*n; i++) ans[i%n] += w[i]; for(int i = 0; i < n; i++) cout << ans[i] << endl; }