#pragma GCC optimize("Ofast") #pragma GCC target("avx2") #define rd_skip() while(*rp++>=48) #define rd() ({long _v=0,_c;while(_c=*rp++-48,_c>=0)_v=_v*10+_c;_v;}) #define wt(v) {ulong _z=v;do*--wp=_z%10+48;while(_z/=10);} #define MD 998244353 typedef unsigned long ulong; #define HASH_BITS 20 #define HASH_MASK ((1<