class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: E = None
        self.z: E = None
        self.v: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: A = None
        self.y: A = None
        self.q: A = None
        self.r: E = None
        self.txt = txt

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

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

g = A("g")
j = B("j")
h = C("h")
m = D("m")
b = E("b")
d = C("d")
n = A("n")
e = E("e")
i = D("i")

g.s = j
g.y = e
g.z = e
g.v = m
j.p = g
j.x = i
h.v = j
h.u = g
h.q = g
h.y = n
h.r = e
m.o = h
m.q = j
b.u = m
b.v = d
b.z = h
d.v = j
d.u = g
d.y = n
d.q = n
d.r = e
n.s = j
n.y = b
n.z = b
n.v = i
e.u = m
e.v = d
e.z = d
i.o = d
i.q = j
assert m.o.q.v.o.y.s.x.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: E = None
        self.z: E = None
        self.v: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: A = None
        self.y: A = None
        self.q: A = None
        self.r: E = None
        self.txt = txt

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

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

g = A("g")
j = B("j")
h = C("h")
m = D("m")
b = E("b")
d = C("d")
n = A("n")
e = E("e")
i = D("i")

g.s = j
g.y = e
g.z = e
g.v = m
j.p = g
j.x = i
h.v = j
h.u = g
h.q = g
h.y = n
h.r = e
m.o = h
m.q = j
b.u = m
b.v = d
b.z = h
d.v = j
d.u = g
d.y = n
d.q = n
d.r = e
n.s = j
n.y = b
n.z = b
n.v = i
e.u = m
e.v = d
e.z = d
i.o = d
i.q = j
assert m.o.q.v.o.y.s.x.txt == "i"