while(x=(s=readline()).slice(6))print(x&--x?s:x+'and x')