stack box - find longest increasing sequence