using hint to construct a string