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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: B = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: B = None
        self.y: B = None
        self.txt = txt

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

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