class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: I = None
        self.o: F = None
        self.p: H = None
        self.t: D = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: H = None
        self.u: I = None
        self.z: C = None
        self.y: I = None
        self.t: E = None
        self.p: F = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: E = None
        self.q: D = None
        self.t: G = None
        self.z: D = None
        self.y: D = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: E = None
        self.s: B = None
        self.q: D = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: D = None
        self.s: D = None
        self.p: A = None
        self.o: A = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: H = None
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: H = None
        self.u: I = None
        self.z: C = None
        self.y: I = None
        self.t: E = None
        self.p: F = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: E = None
        self.q: D = None
        self.t: G = None
        self.z: D = None
        self.y: D = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: E = None
        self.s: B = None
        self.q: D = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: D = None
        self.s: D = None
        self.p: A = None
        self.o: A = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: H = None
        self.o: F = None
        self.txt = txt

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

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