for i in range(32): s = input() print(+(s[0]