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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: A = None
        self.u: A = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

d = A("d")
i = B("i")
c = C("c")
l = D("l")
h = E("h")
f = E("f")
k = E("k")
j = D("j")
b = C("b")
g = A("g")

d.s = h
d.o = h
i.o = c
i.p = f
c.p = l
c.u = k
c.q = d
c.y = d
l.w = c
l.z = d
l.u = g
l.t = g
h.v = l
f.v = l
k.v = j
j.w = c
j.z = g
j.t = g
j.u = d
b.p = j
b.u = k
b.q = d
b.y = d
g.s = f
g.o = k
assert b.y.o.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: A = None
        self.u: A = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

d = A("d")
i = B("i")
c = C("c")
l = D("l")
h = E("h")
f = E("f")
k = E("k")
j = D("j")
b = C("b")
g = A("g")

d.s = h
d.o = h
i.o = c
i.p = f
c.p = l
c.u = k
c.q = d
c.y = d
l.w = c
l.z = d
l.u = g
l.t = g
h.v = l
f.v = l
k.v = j
j.w = c
j.z = g
j.t = g
j.u = d
b.p = j
b.u = k
b.q = d
b.y = d
g.s = f
g.o = k
assert b.y.o.v.t.txt == "g"