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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: A = None
        self.o: B = None
        self.y: A = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: A = None
        self.o: B = None
        self.y: A = None
        self.w: E = None
        self.txt = txt

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

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

e.z = k
e.x = k
e.q = b
j.v = b
d.s = k
d.q = k
d.p = h
d.w = f
d.u = e
k.r = e
k.q = b
k.y = b
k.o = j
k.w = l
l.u = e
f.s = k
f.q = k
f.p = h
f.w = i
f.u = b
h.s = k
h.q = k
h.p = d
h.w = f
h.u = e
i.s = k
i.q = k
i.p = h
i.w = h
i.u = e
b.z = k
b.x = k
b.q = e
assert h.w.s.w.u.q.txt == "b"