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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: C = None
        self.q: C = None
        self.w: A = None
        self.txt = txt

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

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

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

c = A("c")
i = B("i")
h = C("h")
g = D("g")
e = E("e")
f = A("f")
d = E("d")
n = A("n")
k = A("k")

c.s = k
c.p = h
c.o = h
c.x = h
c.t = g
i.z = e
i.y = h
i.q = h
i.w = c
h.s = e
h.y = e
h.u = d
h.w = d
g.p = h
g.v = h
g.u = h
g.s = i
g.q = i
e.o = i
e.z = h
e.t = k
f.s = n
f.p = h
f.o = h
f.x = h
f.t = g
d.o = i
d.z = h
d.t = c
n.s = f
n.p = h
n.o = h
n.x = h
n.t = g
k.s = f
k.p = h
k.o = h
k.x = h
k.t = g
assert k.s.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: C = None
        self.o: C = None
        self.t: D = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: C = None
        self.q: C = None
        self.w: A = None
        self.txt = txt

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

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

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

c = A("c")
i = B("i")
h = C("h")
g = D("g")
e = E("e")
f = A("f")
d = E("d")
n = A("n")
k = A("k")

c.s = k
c.p = h
c.o = h
c.x = h
c.t = g
i.z = e
i.y = h
i.q = h
i.w = c
h.s = e
h.y = e
h.u = d
h.w = d
g.p = h
g.v = h
g.u = h
g.s = i
g.q = i
e.o = i
e.z = h
e.t = k
f.s = n
f.p = h
f.o = h
f.x = h
f.t = g
d.o = i
d.z = h
d.t = c
n.s = f
n.p = h
n.o = h
n.x = h
n.t = g
k.s = f
k.p = h
k.o = h
k.x = h
k.t = g
assert k.s.o.s.txt == "e"