program ABC056A
    implicit none
    character(1)::a,b
    read(5,*)a,b

    if(a=="H".and.b=="H")then
        print'(A)',"H"
    else if(a=="D".and.b=="H")then
        print'(A)',"D"
    else if(a=="H".and.b=="D")then
        print'(A)',"H"
    else if(a=="D".and.b=="D")then
        print'(A)',"D"
    end if
end program ABC056A