s="5555555595555A65556AA696AA6666666955"
# 0101->11
# 0110->10
# 1010->00
# 1001->01
s1=''
lst1=[]
for i in s:
t=bin(int(i,16))
if len(t)!=6:
t=t[:2]+'0'+t[2:]
# print(t)
if '0101' in t:
s1+='11'
elif '0110' in t:
s1+='10'
elif '1010' in t:
s1+='00'
else:
s1+='01'
if len(s1)==8:
lst1.append(hex(int(s1[::-1],2)))
s1=''
print(lst1)