mod=998244353 def f(T): m=len(T) res=0 for i in range(m): res+=pow2[i]*pow11[m-i-1]%mod*int(T[i]) res%=mod return res n=int(input()) N=1<