This problem differs from the next one only in the presence of the constraint on the equal length of all numbers $a_1, a_2, \dots, a_n$. Actually, this problem is a subtask of the problem D2 from the same contest and the solution of D2 solves this subtask too.

A team of SIS students is going to make a trip on a submarine. Their target is an ancient treasure in a sunken ship lying on the bottom of the Great Rybinsk sea. Unfortunately, the students don't know the coordinates of the ship, so they asked Meshanya (who is a hereditary mage) to help them. He agreed to help them, but only if they solve his problem.

Let's denote a function that alternates digits of two numbers $f(a_1 a_2 \dots a_{p - 1} a_p, b_1 b_2 \dots b_{q - 1} b_q)$, where $a_1 \dots a_p$ and $b_1 \dots b_q$ are digits of two integers written in the decimal notation without leading zeros.

In other words, the function $f(x, y)$ alternately shuffles the digits of the numbers $x$ and $y$ by writing them from the lowest digits to the older ones, starting with the number $y$. The result of the function is also built from right to left (that is, from the lower digits to the older ones). If the digits of one of the arguments have ended, then the remaining digits of the other argument are written out. Familiarize with examples and formal definitions of the function below.

For example: $$f(1111, 2222) = 12121212$$ $$f(7777, 888) = 7787878$$ $$f(33, 44444) = 4443434$$ $$f(555, 6) = 5556$$ $$f(111, 2222) = 2121212$$

Formally,  if $p \ge q$ then $f(a_1 \dots a_p, b_1 \dots b_q) = a_1 a_2 \dots a_{p - q + 1} b_1 a_{p - q + 2} b_2 \dots a_{p - 1} b_{q - 1} a_p b_q$;  if $p < q$ then $f(a_1 \dots a_p, b_1 \dots b_q) = b_1 b_2 \dots b_{q - p} a_1 b_{q - p + 1} a_2 \dots a_{p - 1} b_{q - 1} a_p b_q$. 

Mishanya gives you an array consisting of $n$ integers $a_i$. All numbers in this array are of equal length (that is, they consist of the same number of digits). Your task is to help students to calculate $\sum_{i = 1}^{n}\sum_{j = 1}^{n} f(a_i, a_j)$ modulo $998\,244\,353$.


-----Input-----

The first line of the input contains a single integer $n$ ($1 \le n \le 100\,000$) — the number of elements in the array. The second line of the input contains $n$ integers $a_1, a_2, \dots, a_n$ ($1 \le a_i \le 10^9$) — the elements of the array. All numbers $a_1, a_2, \dots, a_n$ are of equal length (that is, they consist of the same number of digits).


-----Output-----

Print the answer modulo $998\,244\,353$.


-----Examples-----
Input
3
12 33 45

Output
26730
Input
2
123 456

Output
1115598
Input
1
1

Output
11
Input
5
1000000000 1000000000 1000000000 1000000000 1000000000

Output
265359409

Difficulty: interview

Starter code:

Solutions:
a = int(input())
c = list(map(int,input().split()))
summ = 0
for i in range(a):
    k = 0
    k1 = 0
    s = str(c[i])
    for x in s:
        k  = k * 100 + int(x)
    k1 = k * 10
    summ += (k + k1) * a
    summ %= 998244353
print(summ)

n = int(input())

a = list(map(str, input().split()))

ans = 0
for t in a:
    s=''
    for j in t:
        s+=2*j
    ans+=int(s)
    ans%=998244353

print((n*ans)%998244353)


mod = 998244353
n = int(input())
a = list(map(int, input().split()))
s = 0
for i in range(n):
    x = a[i]
    cur, pw = 0, 1
    while x:
        cur += 11 * (x % 10) * pw
        x = x // 10
        pw *= 100
    s += cur
    if s >= mod:
        s %= mod
print((s * n) % mod)

n = int(input())
l = list(map(int, input().split()))
ans = 0
for elem in l:
    nn = 0
    ln = len(str(elem))
    for i in range(ln):
        nn += (elem // 10 ** (ln - i - 1) % 10) * 11 * 10 ** ((ln - i - 1) * 2)
    ans += nn * n
print(ans % 998244353)

modulo = 998244353

def conv(x):
    res = 0
    for v in x:
        res = (res * 100 + int(v)) % modulo
    return res

n = int(input())
print(sum(map(conv, input().split())) * n * 11 % modulo)

n = int(input())
l = list(map(int,input().split()))
answer = 0
mod = 998244353
for val in l:
    itr = 0
    while val > 0:
        cur = val % 10;
        val //= 10
        answer += n * cur * (10 ** itr) % mod 
        itr += 1
        answer += n * cur * (10 ** itr) % mod
        itr += 1
        answer %= mod
print(answer)

MOD = 998244353
n = int(input())
a = [int(w) for w in input().split()]

def pad(x, k):
    e = 1
    r = 0
    while x > 0:
        r += e * (x % 10)
        x //= 10
        e *= 100 if k > 0 else 10
        k -= 1
    return r

r = 0
for x in a:
    r = (r + pad(x, 57)) % MOD

print(r * n * 11 % MOD)


import sys

n = int(sys.stdin.readline().strip())
a = sys.stdin.readline().strip().split()
k = len(str(a[0]))
A = [0] * k
for i in range (0, n):
    for j in range (0, k):
        A[j] = A[j] + int(a[i][j])
s = 0
for j in range (0, k):
    s = (s + 11 * (100**(k-j-1)) * A[j]) % 998244353
print((s * n) % 998244353)

from collections import defaultdict
m = 998244353
n = int(input())


#a = list(map(int,input().split()))
a = list(input().split())
digits = defaultdict(int)

l = len(a[0])*2
for x in a:
    for i,c in enumerate(x):
        digits[l-i*2] += int(c)*n
        digits[l-i*2-1]+= int(c)*n

for x in range(1,l+1):
    current = digits[x]
    over = current//10
    digits[x+1]+=over
    digits[x]%=10

out = 0
mu = 1
for k in sorted(digits.keys()):
    out += digits[k]*mu
    out %= m
    mu *=10
print (out)

n = int(input())
ans = 0
mod = 998244353
li = input().split()
for i in li:
    t = 10
    for j in i[::-1]:
        ans += (ord(j) - ord('0')) * t * n
        ans += (ord(j) - ord('0')) * (t // 10) * n
        t *= 100
    ans %= mod
print(ans)


import sys
input = sys.stdin.readline

n=int(input())
A=list(input().split())
mod= 998244353


def dup(a):
    ANS=""
    for k in a:
        ANS+=k*2

    return int(ANS)

B=[dup(a) for a in A]

ANS=0
for b in B:
    ANS=(ANS+b*n)%mod

print(ANS)


# your code goes here
a=int(input())
li=list(map(int,input().split()))
b=[]
zz=len(str(li[0]))
op=[10**i for i in range(20)]
r=998244353
for i in li:
    i=str(i)
    p=0
    q=0
    z=2*zz-1
    z1=2*zz-2
    for j in i:
        j=int(j)
        p+=j*op[z]
        q+=j*op[z1]
        z-=2
        z1-=2
    b.append((((p+q)%r)*(a))%r)
ans=0
for i in b:
    ans+=i%r
print(ans%r)
       
        
        
        
        


n = int(input())
a = list(input().split())

ans = 0
for x in a:
    num = ''
    for y in x:
        num += y+y
    num = int(num)
    ans += num
    ans %= 998244353

ans *= n
ans %= 998244353
print(ans)


n = int(input())
s = [int(i) for i in input().split()]
ans = 0
for i in range(n):
    c = 0
    while s[i] != 0:
        d = s[i]%10
        s[i]//=10
        ans+=d*11*10**c*n
        c+=2
        ans%=998244353
print(ans)

import itertools
def F(s):
    a = ''
    for i in s:
        a += i * 2
    return int(a)
n = int(input())
a = input().split()
print((sum(list(map(F, a))) * n) % 998244353)


def gns():
    return list(map(int,input().split()))
n=int(input())
ns=input().split()
def db(x):
    ans=''
    for c in x:
        ans+=c*2
    return ans
md=998244353
ns=[int(db(x))%md for x in ns]
sm=sum(ns)
print((sm*n)%md)



mod =  998244353
n=int(input())
a=[int(i) for i in input().split()]
s=0
b=""
for i in range(n):
  s1=str(a[i])
  b=""
  for i in range(len(s1)):
    b=b+s1[i]+s1[i]
  s+=int(b)%mod
print((s*n)%mod)

import math
from collections import deque, defaultdict
from sys import stdin, stdout
input = stdin.readline
# print = stdout.write
listin = lambda : list(map(int, input().split()))
mapin = lambda : map(int, input().split())
def doTheThing(s):
    t = ''
    for i in s:
        t+=i
        t+=i
    return int(t)
n = int(input())
a = list(input().split())
a = [doTheThing(i) for i in a]
ans = 0
for i in a:
    ans+=(i*n)%998244353
    ans%=998244353
print(ans)

n = int(input())

A = input().split()

_len = len(A[0])
prec = [0 for i in range(_len)]
for i in range(_len):
	for j in A:
		prec[i] += int(j[i])

ans = 0
for i in range(_len):
	ans += prec[i] * 11 * n * 10 ** (2 * (_len - 1 - i))
	
print(ans % 998244353)







are      =           int(input())















dfhdsf      =            list(map(int,input().split()))













bre       =      []

















zzre    =    len(str(dfhdsf[0]))
















dfkhdjghdfd             =           [10**i    for   i   in        range(20)]





























rre               =                998244353
























for i in dfhdsf:

















    i            =                      str(i)
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    pre       =         0
   
   
   
   
   
   
   
   
   
   
   
   
   
   
    qre                     =        0
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    zre                =            2      *    zzre            -       1



























    z1re              =           2  *  zzre         -         2
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    for j in i:
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        j     =      int(j)
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        pre       +=       j  *   dfkhdjghdfd[zre]
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        qre          +=           j  *  dfkhdjghdfd[  z1re  ]
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
        zre      -=              2
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        z1re                -=       2
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    bre.append((((pre    +     qre)   % rre)   *   (are))  %  rre)














result               =                       0























for i in bre:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    result     +=          i  %  rre



















print(result % rre)
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
             
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        


n=int(input())
a=list(map(str,input().split()))
mod=998244353
ans=0
for i in range(n):
    for j in range(len(a[i])):
        ans+=int(a[i][len(a[i])-j-1])*(10**(2*j)+10**(2*j+1))
        ans%=mod
print(ans*n%mod)