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

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

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

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

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

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

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

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

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

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

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

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

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