First page Back Continue Last page Graphics

Trying to achieve O(1)