import re while 1:print(re.search(input().replace(*'_.'),'r=r>s=s>p=p>r