Labeling the complete bipartite graph with no zero cycles

Assume that the edges of the complete bipartite graph Kn,n are labeled with elements of F2, such that the sum over any simple cycle is nonzero. What is the smallest possible value of d? This problem was raised by Gopalan et al. [SODA 2017] as it characterizes the alphabet size needed for maximally recoverable codes in grid topologies. We show that the answer is that d is linear in n. The upper bound is an explicit construction which improves upon the random construction. The lower bound is more technical, and relies on the study of independent sets in certain Cayley graphs of the permutation group.