static int modRange_incl(int i, int start, int end) { ret start+mod(i-start, end-start+1); }