solved compressed sequence