@staticmethod
def c():
    (n, q, *lr) = map(int, sys.stdin.read().split())
    (l, r) = np.array(lr).reshape(q, 2).T
    res = np.zeros((n + 1), dtype=int)
    np.add.at(res, (l - 1), 1)
    np.subtract.at(res, r, 1)
    np.cumsum(res, out=res)
    res = (res & 1)
    print(''.join(map(str, res[:(- 1)])))
@staticmethod
def c():
    (n, q, *lr) = map(int, sys.stdin.read().split())
    (l, r) = np.array(lr).reshape(q, 2).T
    res = np.zeros((n + 1), dtype=int)
    np.add.at(res, (l - 1), 1)
    np.subtract.at(res, r, 1)
    np.cumsum(res, out=res)
    res = (res & 1)
    print(.join(map(str, res[:(- 1)])))