class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: C = None
        self.o: I = None
        self.w: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: H = None
        self.z: G = None
        self.o: H = None
        self.u: A = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: G = None
        self.w: B = None
        self.r: B = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: A = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: I = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: A = None
        self.x: I = None
        self.y: A = None
        self.r: C = None
        self.t: H = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

e = A("e")
d = B("d")
b = C("b")
l = D("l")
a = E("a")
j = F("j")
c = G("c")
m = H("m")
i = I("i")
f = G("f")

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: H = None
        self.z: G = None
        self.o: H = None
        self.u: A = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: G = None
        self.w: B = None
        self.r: B = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: A = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: I = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: A = None
        self.x: I = None
        self.y: A = None
        self.r: C = None
        self.t: H = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

e = A("e")
d = B("d")
b = C("b")
l = D("l")
a = E("a")
j = F("j")
c = G("c")
m = H("m")
i = I("i")
f = G("f")

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