this problem differ previous absence constraint equal length number a_1 a_2 dots a_na team SIS student go trip submarine their target ancient treasure sunken ship lie Great Rybinsk sea unfortunately student do not know coordinate ship ask Meshanya hereditary mage help he agree help solve problemlets denote function alternate digits number fa_1 a_2 dot a_p 1 a_p b_1 b_2 dot b_q 1 b_q a_1 dot a_p b_1 dot b_q digit integer write decimal notation lead zerosIn word function fx y alternately shuffle digits number x y write low digit old one start number y the result function build right leave low digit old one if digit argument end remain digit argument write Familiarize example formal definition function belowfor example f1111 2222 12121212 f7777 888 7787878 f33 44444 4443434 f555 6 5556 f111 2222 2121212formally p ge q fa_1 dot a_p b_1 dot b_q a_1 a_2 dot a_p q 1 b_1 a_p q 2 b_2 dot a_p 1 b_q 1 a_p b_q p q fa_1 dot a_p b_1 dot b_q b_1 b_2 dot b_q p a_1 b_q p 1 a_2 dot a_p 1 b_q 1 a_p b_q Mishanya give array consist n integer a_i task help student calculate sum_i 1nsum_j 1n fa_i a_j modulo 998244353