class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: G = None
        self.z: D = None
        self.p: G = None
        self.q: B = None
        self.t: D = None
        self.y: F = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: C = None
        self.r: J = None
        self.t: F = None
        self.s: A = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: C = None
        self.v: H = None
        self.r: B = None
        self.x: C = None
        self.u: F = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: G = None
        self.w: J = None
        self.t: D = None
        self.p: B = None
        self.v: A = None
        self.r: C = None
        self.o: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: C = None
        self.u: H = None
        self.w: J = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: A = None
        self.o: A = None
        self.v: A = None
        self.t: H = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: C = None
        self.z: D = None
        self.t: H = None
        self.w: C = None
        self.q: H = None
        self.p: G = None
        self.txt = txt

g = A("g")
i = B("i")
f = C("f")
e = D("e")
h = E("h")
d = F("d")
k = G("k")
j = H("j")
n = I("n")
b = J("b")

g.x = k
g.s = k
g.p = k
g.z = e
g.t = e
g.q = i
g.y = d
g.u = h
i.y = k
i.q = f
i.r = b
i.t = d
i.w = d
i.s = g
f.w = b
e.q = i
e.r = i
e.z = f
e.x = f
e.v = j
e.u = d
e.p = g
h.o = f
d.u = k
d.q = k
d.w = b
d.o = b
d.t = e
d.p = i
d.v = g
d.r = f
k.q = h
k.t = f
k.u = j
k.w = b
k.v = i
j.r = k
n.s = k
n.p = g
n.o = g
n.v = g
n.y = g
n.t = j
b.r = f
b.u = f
b.w = f
b.z = e
b.t = j
b.q = j
b.p = k
assert g.y.q.v.txt == "
class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: G = None
        self.z: D = None
        self.p: G = None
        self.q: B = None
        self.t: D = None
        self.y: F = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: C = None
        self.r: J = None
        self.t: F = None
        self.s: A = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: C = None
        self.v: H = None
        self.r: B = None
        self.x: C = None
        self.u: F = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: G = None
        self.w: J = None
        self.t: D = None
        self.p: B = None
        self.v: A = None
        self.r: C = None
        self.o: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: C = None
        self.u: H = None
        self.w: J = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: A = None
        self.o: A = None
        self.v: A = None
        self.t: H = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: C = None
        self.z: D = None
        self.t: H = None
        self.w: C = None
        self.q: H = None
        self.p: G = None
        self.txt = txt

g = A("g")
i = B("i")
f = C("f")
e = D("e")
h = E("h")
d = F("d")
k = G("k")
j = H("j")
n = I("n")
b = J("b")

g.x = k
g.s = k
g.p = k
g.z = e
g.t = e
g.q = i
g.y = d
g.u = h
i.y = k
i.q = f
i.r = b
i.t = d
i.w = d
i.s = g
f.w = b
e.q = i
e.r = i
e.z = f
e.x = f
e.v = j
e.u = d
e.p = g
h.o = f
d.u = k
d.q = k
d.w = b
d.o = b
d.t = e
d.p = i
d.v = g
d.r = f
k.q = h
k.t = f
k.u = j
k.w = b
k.v = i
j.r = k
n.s = k
n.p = g
n.o = g
n.v = g
n.y = g
n.t = j
b.r = f
b.u = f
b.w = f
b.z = e
b.t = j
b.q = j
b.p = k
assert g.y.q.v.txt == "i"