As an elegant and accomplished girl, Bella loves watching stars at night (especially the Polaris). There are totally $n$ stars in the sky. We can define $a_i$ as the initial $brightness$ of $i$-th star.
At $t$-th second, the $brightness$ of some stars may change due to stars' activity. To simplify this problem, we can approximately divide activities into two kinds:
1. $\forall i \in [l,r]$ , the $brightness$ of $i$-th star decreases by $a_i \& (-a_i)$
2. $\forall i \in [l,r], a_i \neq 0$ , the $brightness$ of $i$-th star increases by $2^k$, where $k$ satisfy $2^k\leq a_i < 2^{k+1}$
Also, Bella has some queries. For each query, she wants to know the $sum$ of $brightness$ of stars in the range $[l,r]$, which means $\sum_{i=l}^r a_i$
As we all know, Bella is a big smart. Thus, she could not solve such difficult problem by herself. Please help her solve this problem and answer her queries.
Since the answer may be too large, please output the answer modulo $998244353$