That is a tough call. Both are on a similar level in my mind. I hate to say it, but, gun to my head I think I might have to say Hamed. In spite of his moronic personality and childish antics, he did dominate his division for several years and beat some very good fighters (Kevin Kelley, Wilfredo Vazquez, Wayne McCullough, Boom Boom Johnson). His decision loss to a great fighter like Barrera is a lot easier to explain than Kostya getting completely dismantled by Cool Vince Phillips. As embarrassing as Hamed was out of the ring, he was never truly embarrassed inside the ring. (And that includes the Barrera fight, which was a lot closer than people seem to remember)
Tszyu was better. Better longevity, beat better fighters, better signature win etc Someone mentioned the Vince Phillips fight (which had some mitigating circumstances concerning outside the ring legal distractions for Kostya) but Tszyu at least showed an ability to come back from this set back and re-establish himself as the best fighter in the division. Hamed got beaten (and the Barrera fight wasn’t close at all, Hamed was exposed completely) and bitched out of the sport. He didn’t have the heart to mix it with the MAB’s, Morales or Pac-Mans anymore because he knew they’d trash him as well.
To answer the question I posed... I think Tszyu was greater, but prime-for-prime, I think the 95-97 Hamed was better than prime Tszyu.