• + 0 comments
    import re
    for _ in range(int(input())):
        if r := re.match(r"[Hh][Ii]\s[^Dd].+", input()):
            print(r.string)