from collections import Counter mod=998244353 C=Counter() P=[3, 7, 31, 127, 8191, 131071, 524287, 2147483647, 2305843009213693951, 618970019642690137449562111,162259276829213363391578010288127, 170141183460469231731687303715884105727,2**521 - 1,2**607 - 1,2**1279 - 1] LEN=len(P) for i in range(1<