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

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

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

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

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

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

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

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

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

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

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

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

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