class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: D = None
        self.o: C = None
        self.txt = txt

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

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

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

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

c = A("c")
d = B("d")
l = C("l")
j = D("j")
i = E("i")
a = D("a")
m = B("m")

c.q = j
c.p = j
c.o = l
d.o = a
l.x = a
l.o = m
l.v = i
l.u = i
j.p = d
j.v = c
j.o = a
j.u = i
j.t = i
i.y = d
i.z = d
i.p = a
i.x = j
i.t = j
a.p = d
a.v = c
a.o = j
a.u = i
a.t = i
m.o = a
assert c.o.v.z.o.p.o.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: D = None
        self.o: C = None
        self.txt = txt

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

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

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

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

c = A("c")
d = B("d")
l = C("l")
j = D("j")
i = E("i")
a = D("a")
m = B("m")

c.q = j
c.p = j
c.o = l
d.o = a
l.x = a
l.o = m
l.v = i
l.u = i
j.p = d
j.v = c
j.o = a
j.u = i
j.t = i
i.y = d
i.z = d
i.p = a
i.x = j
i.t = j
a.p = d
a.v = c
a.o = j
a.u = i
a.t = i
m.o = a
assert c.o.v.z.o.p.o.txt == "a"