@staticmethod
def a():
    s = sys.stdin.readline().rstrip()
    print(('YES' if (s[(- 1)] == 'T') else 'NO'))
@staticmethod
def a():
    s = sys.stdin.readline().rstrip()
    print(('YES' if (s[(- 1)] == 'T') else 'NO'))