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

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

b.u = h
b.o = g
a.q = g
a.t = g
a.z = j
a.s = l
a.u = b
e.p = d
e.r = d
e.w = k
e.t = k
e.s = b
d.z = f
g.r = k
g.p = e
g.x = j
g.u = j
f.q = g
f.z = j
f.t = j
f.s = l
f.u = b
h.p = d
h.r = d
h.w = b
h.s = b
h.t = k
j.r = k
j.p = h
j.x = g
j.u = g
k.u = h
k.o = j
l.q = j
l.z = j
l.s = a
l.t = g
l.u = k
assert h.r.z.t.u.txt == "g"