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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: E = None
        self.o: C = None
        self.y: B = None
        self.u: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: E = None
        self.o: C = None
        self.y: B = None
        self.u: D = None
        self.txt = txt

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

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

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