package main import."os"func main(){b:=make([]byte,1e4);Stdin.Read(b);for _,c:=range b{print(string(`0 `[1>>(c*c-c*10)]))}}