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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: D = None
        self.y: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: B = None
        self.x: C = None
        self.s: D = None
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: D = None
        self.y: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: B = None
        self.x: C = None
        self.s: D = None
        self.p: C = None
        self.txt = txt

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

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