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

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

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

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

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

f = A("f")
j = B("j")
l = C("l")
e = D("e")
a = E("a")
i = B("i")
b = A("b")
c = E("c")
n = A("n")
d = D("d")

f.o = e
f.x = a
f.u = a
f.z = l
f.q = l
j.t = d
j.w = i
j.y = i
j.v = e
l.u = n
e.v = c
e.w = n
e.q = j
a.r = j
a.z = f
a.u = e
a.t = l
a.q = i
i.t = d
i.w = j
i.y = j
i.v = e
b.o = d
b.x = a
b.u = a
b.z = l
b.q = l
c.r = j
c.q = j
c.z = b
c.u = d
c.t = l
n.o = e
n.x = c
n.u = c
n.z = l
n.q = l
d.v = a
d.w = f
d.q = j
assert d.w.q.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: E = None
        self.z: C = None
        self.u: E = None
        self.q: C = None
        self.txt = txt

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

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

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

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

f = A("f")
j = B("j")
l = C("l")
e = D("e")
a = E("a")
i = B("i")
b = A("b")
c = E("c")
n = A("n")
d = D("d")

f.o = e
f.x = a
f.u = a
f.z = l
f.q = l
j.t = d
j.w = i
j.y = i
j.v = e
l.u = n
e.v = c
e.w = n
e.q = j
a.r = j
a.z = f
a.u = e
a.t = l
a.q = i
i.t = d
i.w = j
i.y = j
i.v = e
b.o = d
b.x = a
b.u = a
b.z = l
b.q = l
c.r = j
c.q = j
c.z = b
c.u = d
c.t = l
n.o = e
n.x = c
n.u = c
n.z = l
n.q = l
d.v = a
d.w = f
d.q = j
assert d.w.q.u.o.txt == "e"