Unique element in 3 dup
RMQ