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

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

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

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

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

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

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

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

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

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

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

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

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