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

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

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: E = None
        self.r: A = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: E = None
        self.r: A = None
        self.p: A = None
        self.txt = txt

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

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

l.t = c
l.z = m
l.s = m
c.o = g
c.x = m
c.t = f
c.s = n
k.x = c
m.u = i
m.r = i
m.t = g
m.p = j
n.v = c
n.u = j
n.z = l
n.t = l
g.v = c
g.u = j
g.z = l
g.t = l
f.x = c
j.t = c
j.z = m
j.s = m
a.t = c
a.z = m
a.s = m
i.t = c
i.z = m
i.s = m
assert f.x.x.p.z.p.z.txt == "m"