func main() var n: int :: cui@inputInt() var nums: []bool :: [true].repeat(10) for(1, n) var strs: [][]char :: cui@input().split(" ") var r: bool :: strs[4] = "YES" var tmp: []bool :: [!r].repeat(10) for i(0, 3) do tmp[strs[i].toInt(&)] :: r end for for i(0, 9) do nums[i] :: nums[i] & tmp[i] end for end for for i(0, 9) if(nums[i]) do cui@print("\{i}\n") end if end for end func