import sys input=lambda:sys.stdin.readline().rstrip() def kadomatsu(a): return (a[1]>a[0] and a[1]>a[2] and a[0]!=a[2]) or (a[1]