class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: A = None
        self.w: F = None
        self.q: E = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: H = None
        self.v: F = None
        self.q: H = None
        self.z: A = None
        self.u: G = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: E = None
        self.t: D = None
        self.u: G = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: F = None
        self.u: A = None
        self.o: H = None
        self.v: C = None
        self.txt = txt

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

l = A("l")
m = B("m")
j = C("j")
e = D("e")
n = E("n")
a = F("a")
b = G("b")
i = H("i")

l.p = j
l.s = n
m.z = b
m.q = n
j.x = e
j.z = l
j.w = a
j.q = n
j.o = b
e.o = n
e.y = i
e.q = i
e.v = a
e.r = a
e.z = l
e.u = b
n.u = e
n.z = a
a.o = i
a.p = n
a.t = e
a.u = b
a.q = j
b.w = a
b.x = a
b.u = l
b.o = i
b.v = j
i.r = m
i.u = m
assert e.z.s.u.o.z.q.o.o.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: A = None
        self.w: F = None
        self.q: E = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: H = None
        self.v: F = None
        self.q: H = None
        self.z: A = None
        self.u: G = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: E = None
        self.t: D = None
        self.u: G = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: F = None
        self.u: A = None
        self.o: H = None
        self.v: C = None
        self.txt = txt

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

l = A("l")
m = B("m")
j = C("j")
e = D("e")
n = E("n")
a = F("a")
b = G("b")
i = H("i")

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