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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: E = None
        self.z: C = None
        self.v: D = None
        self.y: E = None
        self.txt = txt

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

e = A("e")
m = B("m")
g = C("g")
f = D("f")
d = E("d")
l = D("l")
a = B("a")
h = E("h")
i = D("i")

e.w = g
e.p = a
m.o = d
m.s = d
m.p = a
g.y = f
g.t = d
f.t = g
f.z = g
f.x = h
f.v = l
f.y = d
d.o = g
l.t = g
l.z = g
l.x = d
l.v = f
l.y = h
a.o = h
a.s = h
a.p = m
h.o = g
i.t = g
i.z = g
i.x = d
i.y = d
i.v = f
assert h.o.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: E = None
        self.z: C = None
        self.v: D = None
        self.y: E = None
        self.txt = txt

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

e = A("e")
m = B("m")
g = C("g")
f = D("f")
d = E("d")
l = D("l")
a = B("a")
h = E("h")
i = D("i")

e.w = g
e.p = a
m.o = d
m.s = d
m.p = a
g.y = f
g.t = d
f.t = g
f.z = g
f.x = h
f.v = l
f.y = d
d.o = g
l.t = g
l.z = g
l.x = d
l.v = f
l.y = h
a.o = h
a.s = h
a.p = m
h.o = g
i.t = g
i.z = g
i.x = d
i.y = d
i.v = f
assert h.o.t.o.txt == "g"