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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: E = None
        self.p: E = None
        self.z: D = None
        self.u: B = None
        self.txt = txt

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

l = A("l")
j = B("j")
m = C("m")
e = D("e")
h = E("h")
b = D("b")
a = B("a")
k = C("k")
c = A("c")

l.q = e
l.y = c
l.z = j
j.x = l
j.u = m
j.v = a
j.z = k
m.p = h
m.t = h
m.s = c
m.q = c
m.u = c
e.o = h
e.t = h
e.p = h
e.z = b
e.u = a
h.w = b
h.o = b
h.q = e
h.s = k
h.u = m
b.o = h
b.t = h
b.p = h
b.z = e
b.u = a
a.x = c
a.u = k
a.v = j
a.z = m
k.p = h
k.t = h
k.s = l
k.q = c
k.u = c
c.q = b
c.y = l
c.z = j
assert e.u.z.t.q.o.u.q.q.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: A = None
        self.z: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: E = None
        self.p: E = None
        self.z: D = None
        self.u: B = None
        self.txt = txt

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

l = A("l")
j = B("j")
m = C("m")
e = D("e")
h = E("h")
b = D("b")
a = B("a")
k = C("k")
c = A("c")

l.q = e
l.y = c
l.z = j
j.x = l
j.u = m
j.v = a
j.z = k
m.p = h
m.t = h
m.s = c
m.q = c
m.u = c
e.o = h
e.t = h
e.p = h
e.z = b
e.u = a
h.w = b
h.o = b
h.q = e
h.s = k
h.u = m
b.o = h
b.t = h
b.p = h
b.z = e
b.u = a
a.x = c
a.u = k
a.v = j
a.z = m
k.p = h
k.t = h
k.s = l
k.q = c
k.u = c
c.q = b
c.y = l
c.z = j
assert e.u.z.t.q.o.u.q.q.txt == "b"