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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: C = None
        self.s: D = None
        self.p: D = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: B = None
        self.v: E = None
        self.s: D = None
        self.r: E = None
        self.txt = txt

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

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

e = A("e")
g = B("g")
b = C("b")
c = D("c")
k = E("k")
a = C("a")
n = A("n")
f = A("f")
m = B("m")
l = D("l")

e.w = m
g.o = c
g.p = c
g.t = a
g.s = l
g.x = l
b.o = c
b.w = m
b.v = k
b.r = k
b.s = l
c.o = b
c.q = l
k.u = c
k.y = a
a.o = l
a.s = l
a.w = m
a.v = k
a.r = k
n.w = m
f.w = m
m.o = l
m.s = l
m.p = l
m.x = l
m.t = a
l.o = a
l.q = c
assert e.w.t.w.t.s.o.o.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: C = None
        self.s: D = None
        self.p: D = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: B = None
        self.v: E = None
        self.s: D = None
        self.r: E = None
        self.txt = txt

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

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

e = A("e")
g = B("g")
b = C("b")
c = D("c")
k = E("k")
a = C("a")
n = A("n")
f = A("f")
m = B("m")
l = D("l")

e.w = m
g.o = c
g.p = c
g.t = a
g.s = l
g.x = l
b.o = c
b.w = m
b.v = k
b.r = k
b.s = l
c.o = b
c.q = l
k.u = c
k.y = a
a.o = l
a.s = l
a.w = m
a.v = k
a.r = k
n.w = m
f.w = m
m.o = l
m.s = l
m.p = l
m.x = l
m.t = a
l.o = a
l.q = c
assert e.w.t.w.t.s.o.o.txt == "l"