Code:
awk '/^H/ { h=$0; next }
/^T/ { if (p) print; p=0; next }
substr($0,14,2) == "6h" { if (h) print h; if (d) print d; print; h = d = ""; p=1; next }
{ h = d = ""; p=0; }' file
With only a single example to test with, it's hard to know if this correct. Apparently all the D lines in an entry will have "6H" (not "6h")?