import Bits main=interact$unlines.scanl1(zipWith$(toEnum.).(.f).xor.f).lines f=fromEnum