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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: E = None
        self.t: B = None
        self.v: B = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: E = None
        self.t: B = None
        self.v: B = None
        self.s: B = None
        self.txt = txt

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

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

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

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