O(1) least common ancestor queries for static trees