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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: D = None
        self.y: D = None
        self.x: C = None
        self.w: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: B = None
        self.q: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: D = None
        self.y: D = None
        self.x: C = None
        self.w: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: B = None
        self.q: B = None
        self.txt = txt

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

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