Text this: Three-sided range search in optimal time on a grid [C.T.I. Technical Report] TR 97.7.26