constructing a specified hash function



Hi, all. Recently, I want to construct a specified hash function, which
satisfies

y=h(x), x can be any string, and y must belong to [g^a mod p,g^{a+1}
mod p,...,g^b mod p], and no body knows the discrete logrithm of y
based on g. a,b are known.

H( ): {0,1}*---> [g^a,g^{a+1},...,g^b]


Thanks in advance!!!

.