class A:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: A = None
        self.o: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: E = None
        self.w: E = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: E = None
        self.w: E = None
        self.q: B = None
        self.txt = txt

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

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

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

a.w = f
a.x = f
a.o = g
l.v = e
l.r = e
l.s = f
l.x = i
g.y = k
g.t = i
g.w = i
g.q = d
e.q = f
e.v = d
e.x = i
e.s = h
e.y = h
i.r = g
i.t = l
i.q = l
i.x = e
i.z = e
k.r = g
k.t = d
k.q = d
k.x = e
k.z = e
d.v = e
d.r = e
d.s = f
d.x = b
b.r = g
b.t = d
b.x = e
b.z = e
b.q = l
f.w = a
f.x = a
f.o = h
h.y = b
h.t = i
h.w = k
h.q = l
assert d.x.r.q.v.x.txt == "i"