n = io.read("*n") for i = 1, n do a = io.read("*n") print(a == 1 and 1 or 0) end